(D3D/GL) Use more common code
This commit is contained in:
parent
938dfa775a
commit
1413d97ab0
|
@ -27,11 +27,16 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
#include "../../retroarch.h"
|
#include "../../retroarch.h"
|
||||||
|
#include "../video_thread_wrapper.h"
|
||||||
|
|
||||||
#ifdef HAVE_OPENGL
|
#ifdef HAVE_OPENGL
|
||||||
#include "../drivers_wm/win32_shader_dlg.h"
|
#include "../drivers_wm/win32_shader_dlg.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_D3D
|
||||||
|
#include "../d3d/d3d.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
@ -46,6 +51,8 @@ bool g_quit;
|
||||||
HWND g_hwnd;
|
HWND g_hwnd;
|
||||||
|
|
||||||
extern void *dinput_wgl;
|
extern void *dinput_wgl;
|
||||||
|
extern void *curD3D;
|
||||||
|
extern void *dinput;
|
||||||
|
|
||||||
/* Power Request APIs */
|
/* Power Request APIs */
|
||||||
|
|
||||||
|
@ -194,7 +201,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
||||||
else if (!strcmp(video_driver, "d3d"))
|
else if (!strcmp(video_driver, "d3d"))
|
||||||
{
|
{
|
||||||
LPCREATESTRUCT p_cs = (LPCREATESTRUCT)lparam;
|
LPCREATESTRUCT p_cs = (LPCREATESTRUCT)lparam;
|
||||||
curD3D = (d3d_video_t*)p_cs->lpCreateParams;
|
curD3D = p_cs->lpCreateParams;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -454,7 +461,7 @@ void win32_show_cursor(bool state)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void win32_check_window(bool *quit, unsigned *resize, unsigned *width, unsigned *height)
|
void win32_check_window(bool *quit, bool *resize, unsigned *width, unsigned *height)
|
||||||
{
|
{
|
||||||
#ifndef _XBOX
|
#ifndef _XBOX
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
|
@ -69,7 +69,7 @@ bool win32_get_metrics(void *data,
|
||||||
void win32_show_cursor(bool state);
|
void win32_show_cursor(bool state);
|
||||||
|
|
||||||
void win32_check_window(bool *quit,
|
void win32_check_window(bool *quit,
|
||||||
unsigned *resize, unsigned *width, unsigned *height);
|
bool *resize, unsigned *width, unsigned *height);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
static bool widescreen_mode = false;
|
static bool widescreen_mode = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static d3d_video_t *curD3D = NULL;
|
void *curD3D = NULL;
|
||||||
static void *dinput;
|
void *dinput;
|
||||||
|
|
||||||
extern bool d3d_restore(d3d_video_t *data);
|
extern bool d3d_restore(d3d_video_t *data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue