updated tearing test

This commit is contained in:
Vincent-FK 2020-11-08 16:28:15 +01:00
parent 0f1c90f7e1
commit a5b362a1ec
2 changed files with 4 additions and 3 deletions

View File

@ -67,7 +67,7 @@ void init_libraries(){
/// Open HW screen and set video mode 240x240 /// Open HW screen and set video mode 240x240
hw_surface = SDL_SetVideoMode(SCREEN_HORIZONTAL_SIZE, SCREEN_VERTICAL_SIZE, hw_surface = SDL_SetVideoMode(SCREEN_HORIZONTAL_SIZE, SCREEN_VERTICAL_SIZE,
32, SDL_HWSURFACE | SDL_DOUBLEBUF); 32, SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN);
/*hw_surface = SDL_SetVideoMode(SCREEN_HORIZONTAL_SIZE, SCREEN_VERTICAL_SIZE, /*hw_surface = SDL_SetVideoMode(SCREEN_HORIZONTAL_SIZE, SCREEN_VERTICAL_SIZE,
32, SDL_HWSURFACE);*/ 32, SDL_HWSURFACE);*/
if (hw_surface == NULL) if (hw_surface == NULL)

View File

@ -6,6 +6,7 @@
#include "funkey_prod_screens.h" #include "funkey_prod_screens.h"
static int bright = 0; static int bright = 0;
FILE *fptr;
/// -------------- FUNCTIONS IMPLEMENTATION -------------- /// -------------- FUNCTIONS IMPLEMENTATION --------------
static int wait_event_loop(uint32_t fps){ static int wait_event_loop(uint32_t fps){
@ -55,6 +56,7 @@ static int wait_event_loop(uint32_t fps){
bright = 1-bright; bright = 1-bright;
/* Flip screen */ /* Flip screen */
//system("echo 1 > /sys/class/graphics/fb0/switch_backbuf");
SDL_Flip(hw_surface); SDL_Flip(hw_surface);
/* Handle FPS */ /* Handle FPS */
@ -82,8 +84,7 @@ int launch_prod_screen_tearingtest(int argc, char *argv[]){
return EXIT_FAILURE; return EXIT_FAILURE;
} }
} }
//printf("fps = %d, argv[0] = %s\n", fps, argv[0]);
printf("fps = %d, argv[0] = %s\n", fps, argv[0]);
/// Main loop /// Main loop
int res = wait_event_loop(fps); int res = wait_event_loop(fps);