diff options
-rw-r--r-- | minui/graphics_fbdev.cpp | 12 | ||||
-rw-r--r-- | uncrypt/uncrypt.cpp | 7 |
2 files changed, 4 insertions, 15 deletions
diff --git a/minui/graphics_fbdev.cpp b/minui/graphics_fbdev.cpp index 997e9cac2..0788f7552 100644 --- a/minui/graphics_fbdev.cpp +++ b/minui/graphics_fbdev.cpp @@ -176,18 +176,6 @@ static GRSurface* fbdev_init(minui_backend* backend) { static GRSurface* fbdev_flip(minui_backend* backend __unused) { if (double_buffered) { -#if defined(RECOVERY_BGRA) - // In case of BGRA, do some byte swapping - unsigned int idx; - unsigned char tmp; - unsigned char* ucfb_vaddr = (unsigned char*)gr_draw->data; - for (idx = 0 ; idx < (gr_draw->height * gr_draw->row_bytes); - idx += 4) { - tmp = ucfb_vaddr[idx]; - ucfb_vaddr[idx ] = ucfb_vaddr[idx + 2]; - ucfb_vaddr[idx + 2] = tmp; - } -#endif // Change gr_draw to point to the buffer currently displayed, // then flip the driver so we're displaying the other buffer // instead. diff --git a/uncrypt/uncrypt.cpp b/uncrypt/uncrypt.cpp index 20efbe4df..de7e48182 100644 --- a/uncrypt/uncrypt.cpp +++ b/uncrypt/uncrypt.cpp @@ -418,8 +418,6 @@ int uncrypt(const char* input_path, const char* map_file, int status_fd) { } int main(int argc, char** argv) { - const char* input_path; - const char* map_file; if (argc != 3 && argc != 1 && (argc == 2 && strcmp(argv[1], "--reboot") != 0)) { fprintf(stderr, "usage: %s [--reboot] [<transform_path> <map_file>]\n", argv[0]); @@ -443,13 +441,16 @@ int main(int argc, char** argv) { } unique_fd status_fd_holder(status_fd); + std::string package; + const char* input_path; + const char* map_file; + if (argc == 3) { // when command-line args are given this binary is being used // for debugging. input_path = argv[1]; map_file = argv[2]; } else { - std::string package; if (!find_uncrypt_package(package)) { android::base::WriteStringToFd("-1\n", status_fd); return 1; |