(D3D) set_resize function bound to D3D context driver

This commit is contained in:
twinaphex 2014-01-18 21:13:08 +01:00
parent 544df55017
commit 7c1f24c861
2 changed files with 9 additions and 5 deletions

View File

@ -35,9 +35,13 @@ static void *dinput;
extern bool d3d_restore(void *data);
static void d3d_resize(void *data, unsigned new_width, unsigned new_height)
static void d3d_resize(unsigned new_width, unsigned new_height)
{
D3DVideo *d3d = reinterpret_cast<D3DVideo*>(data);
#ifdef _XBOX
D3DVideo *d3d = reinterpret_cast<D3DVideo*>(driver.video_data);
#else
D3DVideo *d3d = reinterpret_cast<D3DVideo*>(curD3D);
#endif
if (!d3d->dev)
return;
@ -79,7 +83,7 @@ LRESULT CALLBACK WindowProc(HWND hWnd, UINT message,
new_height = HIWORD(lParam);
if (new_width && new_height)
d3d_resize(curD3D, new_width, new_height);
d3d_resize(new_width, new_height);
return 0;
}
if (dinput_handle_message(dinput, message, wParam, lParam))
@ -575,7 +579,7 @@ const gfx_ctx_driver_t gfx_ctx_d3d9 = {
NULL,
gfx_ctx_d3d_update_title,
gfx_ctx_d3d_check_window,
NULL, // gfx_ctx_set_resize
d3d_resize,
gfx_ctx_d3d_has_focus,
gfx_ctx_d3d_swap_buffers,
gfx_ctx_d3d_input_driver,

View File

@ -109,7 +109,7 @@ void RenderChain::clear()
luts.clear();
}
void RenderChain::set_final_viewport(const D3DVIEWPORT9& final_viewport)
void RenderChain::set_final_viewport(const D3DVIEWPORT& final_viewport)
{
this->final_viewport = final_viewport;
}