#include "maru_sdl_rotozoom.h"
#include "maru_finger.h"
#include "hw/maru_pm.h"
+#include "hw/maru_brightness.h"
#include "debug_ch.h"
#if defined(CONFIG_LINUX)
#include <sys/shm.h>
extern int g_shmid;
extern char *g_shared_memory;
+static int sdl_skip_update;
+
#if 0
static int sdl_opengl = 0; //0 : just SDL surface, 1 : using SDL with OpenGL
GLuint texture;
pthread_mutex_unlock(&sdl_mutex);
vga_hw_invalidate();
+ sdl_skip_update = 0;
break;
}
}
}
+ /* If the LCD is turned off,
+ the screen does not update until the LCD is turned on */
+ if (sdl_skip_update && brightness_off) {
+ return;
+ }
+
+ /* Usually, continuously updated.
+ When the LCD is turned off,
+ once updates the screen for a black screen. */
vga_hw_update();
+ if (brightness_off) {
+ sdl_skip_update = 1;
+ } else {
+ sdl_skip_update = 0;
+ }
#ifdef TARGET_ARM
#ifdef SDL_THREAD
return NULL;
}
+ /* If the LCD is turned off, return empty buffer.
+ Because the empty buffer is seen as a black. */
+ if (brightness_off) {
+ info->pixel_data_length = length;
+ return info;
+ }
+
pthread_mutex_lock(&mutex_screenshot);
MaruScreenshot* maru_screenshot = get_maru_screenshot();
if ( !maru_screenshot || maru_screenshot->isReady != 1) {