Remove some more HAVE_D3D8/HAVE_D3D9 ifdefs that depend on
compile-time instead of runtime
This commit is contained in:
parent
c76ce05070
commit
4c390944bb
|
@ -75,7 +75,7 @@ const GUID GUID_DEVINTERFACE_HID = { 0x4d1e55b2, 0xf16f, 0x11Cf, { 0x88, 0xcb, 0
|
||||||
static HDEVNOTIFY notification_handler;
|
static HDEVNOTIFY notification_handler;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_D3D8) || defined(HAVE_D3D9) || defined (HAVE_D3D10) || defined (HAVE_D3D11) || defined (HAVE_D3D12)
|
#ifdef HAVE_DINPUT
|
||||||
extern bool dinput_handle_message(void *dinput, UINT message,
|
extern bool dinput_handle_message(void *dinput, UINT message,
|
||||||
WPARAM wParam, LPARAM lParam);
|
WPARAM wParam, LPARAM lParam);
|
||||||
extern void *dinput_gdi;
|
extern void *dinput_gdi;
|
||||||
|
@ -569,7 +569,6 @@ static void win32_set_droppable(ui_window_win32_t *window, bool droppable)
|
||||||
DragAcceptFiles_func(window->hwnd, droppable);
|
DragAcceptFiles_func(window->hwnd, droppable);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_D3D8) || defined(HAVE_D3D9) || defined (HAVE_D3D10) || defined (HAVE_D3D11) || defined (HAVE_D3D12)
|
|
||||||
LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message,
|
LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message,
|
||||||
WPARAM wparam, LPARAM lparam)
|
WPARAM wparam, LPARAM lparam)
|
||||||
{
|
{
|
||||||
|
@ -616,9 +615,11 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message,
|
||||||
win32_set_taskbar_created(true);
|
win32_set_taskbar_created(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_DINPUT
|
||||||
if (dinput && dinput_handle_message(dinput,
|
if (dinput && dinput_handle_message(dinput,
|
||||||
message, wparam, lparam))
|
message, wparam, lparam))
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
return DefWindowProc(hwnd, message, wparam, lparam);
|
return DefWindowProc(hwnd, message, wparam, lparam);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -669,7 +670,7 @@ LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message,
|
||||||
win32_set_taskbar_created(true);
|
win32_set_taskbar_created(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_D3D9) || defined(HAVE_D3D8)
|
#ifdef HAVE_DINPUT
|
||||||
if (dinput_wgl && dinput_handle_message(dinput_wgl,
|
if (dinput_wgl && dinput_handle_message(dinput_wgl,
|
||||||
message, wparam, lparam))
|
message, wparam, lparam))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -767,7 +768,7 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message,
|
||||||
win32_set_taskbar_created(true);
|
win32_set_taskbar_created(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_D3D9) || defined(HAVE_D3D8)
|
#ifdef HAVE_DINPUT
|
||||||
if (dinput_gdi && dinput_handle_message(dinput_gdi,
|
if (dinput_gdi && dinput_handle_message(dinput_gdi,
|
||||||
message, wparam, lparam))
|
message, wparam, lparam))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -175,14 +175,20 @@ static bool gfx_ctx_d3d_bind_api(void *data,
|
||||||
(void)data;
|
(void)data;
|
||||||
(void)major;
|
(void)major;
|
||||||
(void)minor;
|
(void)minor;
|
||||||
(void)api;
|
|
||||||
|
|
||||||
#if defined(HAVE_D3D8)
|
switch (api)
|
||||||
return api == GFX_CTX_DIRECT3D8_API;
|
{
|
||||||
#else
|
case GFX_CTX_DIRECT3D8_API:
|
||||||
/* As long as we don't have a D3D11 implementation, we default to this */
|
if (api == GFX_CTX_DIRECT3D8_API)
|
||||||
return api == GFX_CTX_DIRECT3D9_API;
|
return true;
|
||||||
#endif
|
break;
|
||||||
|
case GFX_CTX_DIRECT3D9_API:
|
||||||
|
if (api == GFX_CTX_DIRECT3D9_API)
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *gfx_ctx_d3d_init(video_frame_info_t *video_info, void *video_driver)
|
static void *gfx_ctx_d3d_init(video_frame_info_t *video_info, void *video_driver)
|
||||||
|
|
Loading…
Reference in New Issue