(D3D) Use win32_set_window

This commit is contained in:
twinaphex 2016-01-09 05:04:47 +01:00
parent c1d79c2205
commit 3e9820f6ae
2 changed files with 4 additions and 19 deletions

View File

@ -449,6 +449,7 @@ bool win32_suppress_screensaver(void *data, bool enable)
void win32_set_window(unsigned *width, unsigned *height,
bool fullscreen, bool windowed_full, void *rect_data)
{
#ifndef _XBOX
settings_t *settings = config_get_ptr();
RECT *rect = (RECT*)rect_data;
@ -470,6 +471,7 @@ void win32_set_window(unsigned *width, unsigned *height,
}
win32_show_cursor(!fullscreen);
#endif
}
bool win32_set_video_mode(void *data,

View File

@ -1041,25 +1041,8 @@ static bool d3d_construct(d3d_video_t *d3d,
win32_window_create(d3d, style, &mon_rect, win_width,
win_height, info->fullscreen);
if (!info->fullscreen || windowed_full)
{
HWND window = win32_get_window();
if (!info->fullscreen && settings->ui.menubar_enable)
{
RECT rc_temp = {0, 0, (LONG)win_height, 0x7FFF};
SetMenu(window, LoadMenu(GetModuleHandle(NULL),MAKEINTRESOURCE(IDR_MENU)));
SendMessage(window, WM_NCCALCSIZE, FALSE, (LPARAM)&rc_temp);
g_resize_height = win_height += rc_temp.top + rect.top;
SetWindowPos(window, NULL, 0, 0, win_width, win_height, SWP_NOMOVE);
}
ShowWindow(window, SW_RESTORE);
UpdateWindow(window);
SetForegroundWindow(window);
SetFocus(window);
}
win32_set_window(&win_width, &win_height, info->fullscreen,
windowed_full, &rect);
#endif
win32_show_cursor(!info->fullscreen);