mirror of
https://github.com/libretro/RetroArch
synced 2025-02-04 12:40:07 +00:00
(D3D) Cleanups
This commit is contained in:
parent
daaabaa663
commit
3ff5c91e5c
@ -101,9 +101,11 @@ static BOOL CALLBACK win32_monitor_enum_proc(HMONITOR hMonitor,
|
||||
|
||||
void win32_monitor_from_window(HWND data, bool destroy)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
win32_monitor_last = MonitorFromWindow(data, MONITOR_DEFAULTTONEAREST);
|
||||
if (destroy)
|
||||
DestroyWindow(data);
|
||||
#endif
|
||||
}
|
||||
|
||||
void win32_monitor_get_info(void)
|
||||
@ -679,6 +681,11 @@ static HANDLE GetFocus(void)
|
||||
{
|
||||
return g_hwnd;
|
||||
}
|
||||
|
||||
BOOL IsIconic(HWND hwnd)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool win32_has_focus(void)
|
||||
|
@ -41,9 +41,6 @@ LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message,
|
||||
|
||||
LRESULT win32_menu_loop(HWND handle, WPARAM wparam);
|
||||
|
||||
|
||||
void win32_monitor_from_window(HWND data, bool destroy);
|
||||
|
||||
void win32_monitor_get_info(void);
|
||||
|
||||
void win32_monitor_info(void *data, void *hm_data, unsigned *mon_id);
|
||||
@ -51,6 +48,8 @@ void win32_monitor_info(void *data, void *hm_data, unsigned *mon_id);
|
||||
bool create_gl_context(HWND hwnd);
|
||||
#endif
|
||||
|
||||
void win32_monitor_from_window(HWND data, bool destroy);
|
||||
|
||||
void win32_monitor_init(void);
|
||||
|
||||
bool win32_set_video_mode(void *data,
|
||||
@ -84,4 +83,8 @@ void win32_window_reset(void);
|
||||
|
||||
void win32_destroy_window(void);
|
||||
|
||||
#ifdef _XBOX
|
||||
BOOL IsIconic(HWND hwnd);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -846,9 +846,7 @@ static void d3d_free(void *data)
|
||||
if (d3d->g_pD3D)
|
||||
d3d->g_pD3D->Release();
|
||||
|
||||
#ifdef HAVE_MONITOR
|
||||
win32_monitor_from_window(window, true);
|
||||
#endif
|
||||
|
||||
if (d3d)
|
||||
delete d3d;
|
||||
@ -1482,11 +1480,9 @@ static bool d3d_frame(void *data, const void *frame,
|
||||
rarch_perf_init(&d3d_frame, "d3d_frame");
|
||||
retro_perf_start(&d3d_frame);
|
||||
|
||||
#ifndef _XBOX
|
||||
/* We cannot recover in fullscreen. */
|
||||
if (d3d->needs_restore && IsIconic(window))
|
||||
return true;
|
||||
#endif
|
||||
if (d3d->needs_restore && !d3d_restore(d3d))
|
||||
{
|
||||
RARCH_ERR("[D3D]: Failed to restore.\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user