mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-08 02:17:13 +00:00
(D3D) Implement stub d3d_restore function for XDK
This commit is contained in:
parent
e4abd58485
commit
e02d61a6a9
@ -49,7 +49,6 @@ extern bool d3d_restore(void *data);
|
||||
static void d3d_resize(void *data, unsigned new_width, unsigned new_height)
|
||||
{
|
||||
(void)data;
|
||||
#ifndef _XBOX
|
||||
d3d_video_t *d3d = (d3d_video_t*)curD3D;
|
||||
LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)d3d->dev;
|
||||
if (!d3dr)
|
||||
@ -63,7 +62,6 @@ static void d3d_resize(void *data, unsigned new_width, unsigned new_height)
|
||||
d3d->video_info.height = d3d->screen_height = new_height;
|
||||
d3d_restore(d3d);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_WINDOW
|
||||
|
@ -500,8 +500,12 @@ static bool d3d_initialize(void *data, const video_info_t *info)
|
||||
bool d3d_restore(void *data)
|
||||
{
|
||||
d3d_video_t *d3d = (d3d_video_t*)data;
|
||||
#ifdef _XBOX
|
||||
d3d->needs_restore = false;
|
||||
#else
|
||||
d3d_deinitialize(d3d);
|
||||
d3d->needs_restore = !d3d_initialize(d3d, &d3d->video_info);
|
||||
#endif
|
||||
|
||||
if (d3d->needs_restore)
|
||||
RARCH_ERR("[D3D]: Restore error.\n");
|
||||
@ -698,13 +702,12 @@ static bool d3d_frame(void *data, const void *frame,
|
||||
// We cannot recover in fullscreen.
|
||||
if (d3d->needs_restore && IsIconic(d3d->hWnd))
|
||||
return true;
|
||||
|
||||
#endif
|
||||
if (d3d->needs_restore && !d3d_restore(d3d))
|
||||
{
|
||||
RARCH_ERR("[D3D]: Failed to restore.\n");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (d3d->should_resize)
|
||||
{
|
||||
|
@ -751,19 +751,22 @@ static bool d3d_initialize(void *data, const video_info_t *info)
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifndef _XBOX
|
||||
|
||||
bool d3d_restore(void *data)
|
||||
{
|
||||
d3d_video_t *d3d = (d3d_video_t*)data;
|
||||
#ifdef _XBOX
|
||||
d3d_deinitialize(d3d);
|
||||
d3d->needs_restore = !d3d_initialize(d3d, &d3d->video_info);
|
||||
#else
|
||||
d3d->needs_restore = false;
|
||||
#endif
|
||||
|
||||
if (d3d->needs_restore)
|
||||
RARCH_ERR("[D3D]: Restore error.\n");
|
||||
|
||||
return !d3d->needs_restore;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void d3d_set_viewport(void *data, int x, int y, unsigned width, unsigned height)
|
||||
{
|
||||
@ -847,13 +850,12 @@ static bool d3d_frame(void *data, const void *frame,
|
||||
// We cannot recover in fullscreen.
|
||||
if (d3d->needs_restore && IsIconic(d3d->hWnd))
|
||||
return true;
|
||||
|
||||
#endif
|
||||
if (d3d->needs_restore && !d3d_restore(d3d))
|
||||
{
|
||||
RARCH_ERR("[D3D]: Failed to restore.\n");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (d3d->should_resize)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user