mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 03:35:22 +00:00
(D3D) Use win32_set_window
This commit is contained in:
parent
c1d79c2205
commit
3e9820f6ae
@ -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,
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user