Skip to content
Snippets Groups Projects
Commit 9d06d169 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Ensure the rectangle we're scaling to the screen matches the screen size.

parent 4cb598e2
No related branches found
No related tags found
No related merge requests found
Pipeline #5835 passed
......@@ -280,9 +280,6 @@ gdi_handle_wm_paint(HWND hwnd)
void *data;
enum ciolib_scaling st;
list = get_rect();
if (list == NULL)
return 0;
pthread_mutex_lock(&vstatlock);
w = vstat.winwidth;
h = vstat.winheight;
......@@ -290,6 +287,13 @@ gdi_handle_wm_paint(HWND hwnd)
vsh = vstat.scrnheight;
bitmap_get_scaled_win_size(vstat.scaling, &sw, &sh, vstat.winwidth, vstat.winheight);
pthread_mutex_unlock(&vstatlock);
while(true) {
list = get_rect();
if (list == NULL)
return 0;
if (vsw == list->rect.width && vsh == list->rect.height)
break;
}
pthread_mutex_lock(&off_lock);
dwidth = sw;
dheight = sh;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment