diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index d7d7f97689..35a9f44b7b 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -217,7 +217,7 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message, return 0; } -extern bool d3d_restore(d3d_video_t *data); +extern bool d3d_restore(void *data); LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) diff --git a/gfx/d3d/d3d.cpp b/gfx/d3d/d3d.cpp index 869dad4473..09e48a2423 100644 --- a/gfx/d3d/d3d.cpp +++ b/gfx/d3d/d3d.cpp @@ -422,10 +422,13 @@ static bool d3d_initialize(d3d_video_t *d3d, const video_info_t *info) return true; } - - -bool d3d_restore(d3d_video_t *d3d) +bool d3d_restore(void *data) { + d3d_video_t *d3d = (d3d_video_t*)data; + + if (!d3d) + return false; + d3d_deinitialize(d3d); d3d->needs_restore = !d3d_initialize(d3d, &d3d->video_info);