diff --git a/firmware/target/hosted/sdl/lcd-sdl.c b/firmware/target/hosted/sdl/lcd-sdl.c index 57026eedfe..40ba94072b 100644 --- a/firmware/target/hosted/sdl/lcd-sdl.c +++ b/firmware/target/hosted/sdl/lcd-sdl.c @@ -24,7 +24,7 @@ #include "sim-ui-defines.h" #include "system.h" /* for MIN() and MAX() */ -int display_zoom = 1; +double display_zoom = 1; void sdl_update_rect(SDL_Surface *surface, int x_start, int y_start, int width, int height, int max_x, int max_y, diff --git a/firmware/target/hosted/sdl/system-sdl.c b/firmware/target/hosted/sdl/system-sdl.c index 1e1968d66d..b03ed89d49 100644 --- a/firmware/target/hosted/sdl/system-sdl.c +++ b/firmware/target/hosted/sdl/system-sdl.c @@ -314,7 +314,7 @@ void sys_handle_argv(int argc, char *argv[]) { x++; if(x < argc) - display_zoom=atoi(argv[x]); + display_zoom=atof(argv[x]); else display_zoom = 2; printf("Window zoom is %d\n", display_zoom); @@ -364,7 +364,7 @@ void sys_handle_argv(int argc, char *argv[]) } } } - if (display_zoom > 1) { + if (display_zoom != 1) { background = false; } } diff --git a/firmware/target/hosted/sdl/system-sdl.h b/firmware/target/hosted/sdl/system-sdl.h index 979d556fdd..43ee0bdff1 100644 --- a/firmware/target/hosted/sdl/system-sdl.h +++ b/firmware/target/hosted/sdl/system-sdl.h @@ -59,7 +59,7 @@ void sim_do_exit(void) NORETURN_ATTR; extern bool background; /* True if the background image is enabled */ extern bool showremote; -extern int display_zoom; +extern double display_zoom; extern long start_tick; #endif /* _SYSTEM_SDL_H_ */