Fix logic in win32_get_video_output_next

This commit is contained in:
twinaphex 2017-08-09 04:07:41 +02:00
parent 1ecdbf4050
commit 97de6deb56

View File

@ -1059,6 +1059,7 @@ void win32_get_video_output_prev(
{
DEVMODE dm;
int iModeNum;
bool found = false;
unsigned prev_width = 0;
unsigned prev_height = 0;
unsigned curr_width = 0;
@ -1075,8 +1076,7 @@ void win32_get_video_output_prev(
{
if (prev_width != curr_width && prev_height != curr_height)
{
*width = dm.dmPelsWidth;
*height = dm.dmPelsHeight;
found = true;
break;
}
}
@ -1084,6 +1084,12 @@ void win32_get_video_output_prev(
prev_width = dm.dmPelsWidth;
prev_height = dm.dmPelsHeight;
}
if (found)
{
*width = prev_width;
*height = prev_height;
}
}
void win32_get_video_output_size(unsigned *width, unsigned *height)