mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 07:13:35 +00:00
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;
|
||||
#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,
|
||||
WPARAM wParam, LPARAM lParam);
|
||||
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);
|
||||
}
|
||||
|
||||
#if defined(HAVE_D3D8) || defined(HAVE_D3D9) || defined (HAVE_D3D10) || defined (HAVE_D3D11) || defined (HAVE_D3D12)
|
||||
LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message,
|
||||
WPARAM wparam, LPARAM lparam)
|
||||
{
|
||||
@ -616,9 +615,11 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message,
|
||||
win32_set_taskbar_created(true);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DINPUT
|
||||
if (dinput && dinput_handle_message(dinput,
|
||||
message, wparam, lparam))
|
||||
return 0;
|
||||
#endif
|
||||
return DefWindowProc(hwnd, message, wparam, lparam);
|
||||
}
|
||||
#endif
|
||||
@ -669,7 +670,7 @@ LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message,
|
||||
win32_set_taskbar_created(true);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_D3D9) || defined(HAVE_D3D8)
|
||||
#ifdef HAVE_DINPUT
|
||||
if (dinput_wgl && dinput_handle_message(dinput_wgl,
|
||||
message, wparam, lparam))
|
||||
return 0;
|
||||
@ -767,7 +768,7 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message,
|
||||
win32_set_taskbar_created(true);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_D3D9) || defined(HAVE_D3D8)
|
||||
#ifdef HAVE_DINPUT
|
||||
if (dinput_gdi && dinput_handle_message(dinput_gdi,
|
||||
message, wparam, lparam))
|
||||
return 0;
|
||||
|
@ -175,14 +175,20 @@ static bool gfx_ctx_d3d_bind_api(void *data,
|
||||
(void)data;
|
||||
(void)major;
|
||||
(void)minor;
|
||||
(void)api;
|
||||
|
||||
#if defined(HAVE_D3D8)
|
||||
return api == GFX_CTX_DIRECT3D8_API;
|
||||
#else
|
||||
/* As long as we don't have a D3D11 implementation, we default to this */
|
||||
return api == GFX_CTX_DIRECT3D9_API;
|
||||
#endif
|
||||
switch (api)
|
||||
{
|
||||
case GFX_CTX_DIRECT3D8_API:
|
||||
if (api == GFX_CTX_DIRECT3D8_API)
|
||||
return true;
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user