Skip to content

Commit

Permalink
updated tearing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent-FK committed Nov 8, 2020
1 parent 0f1c90f commit a5b362a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion funkey_prod_screens.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void init_libraries(){

/// Open HW screen and set video mode 240x240
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,
32, SDL_HWSURFACE);*/
if (hw_surface == NULL)
Expand Down
5 changes: 3 additions & 2 deletions prodScreen_tearingTest.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "funkey_prod_screens.h"

static int bright = 0;
FILE *fptr;

/// -------------- FUNCTIONS IMPLEMENTATION --------------
static int wait_event_loop(uint32_t fps){
Expand Down Expand Up @@ -55,6 +56,7 @@ static int wait_event_loop(uint32_t fps){
bright = 1-bright;

/* Flip screen */
//system("echo 1 > /sys/class/graphics/fb0/switch_backbuf");
SDL_Flip(hw_surface);

/* Handle FPS */
Expand Down Expand Up @@ -82,8 +84,7 @@ int launch_prod_screen_tearingtest(int argc, char *argv[]){
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
int res = wait_event_loop(fps);
Expand Down

0 comments on commit a5b362a

Please sign in to comment.