mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
(Win32) More buildfixes
This commit is contained in:
parent
b2f022ae30
commit
3e977034a7
@ -21,6 +21,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <formats/image.h>
|
#include <formats/image.h>
|
||||||
|
#include <compat/strl.h>
|
||||||
|
#include <compat/posix_string.h>
|
||||||
|
#include <file/file_path.h>
|
||||||
|
|
||||||
#include "d3d.h"
|
#include "d3d.h"
|
||||||
#include "../video_viewport.h"
|
#include "../video_viewport.h"
|
||||||
@ -29,14 +32,12 @@
|
|||||||
#include "render_chain_driver.h"
|
#include "render_chain_driver.h"
|
||||||
|
|
||||||
#include "../common/win32_common.h"
|
#include "../common/win32_common.h"
|
||||||
#ifndef _XBOX
|
|
||||||
|
|
||||||
|
#ifndef _XBOX
|
||||||
#define HAVE_MONITOR
|
#define HAVE_MONITOR
|
||||||
#define HAVE_WINDOW
|
#define HAVE_WINDOW
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <compat/posix_string.h>
|
|
||||||
#include <file/file_path.h>
|
|
||||||
#include "../../performance.h"
|
#include "../../performance.h"
|
||||||
|
|
||||||
#include "d3d_defines.h"
|
#include "d3d_defines.h"
|
||||||
@ -52,8 +53,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <dynamic/dylib.h>
|
|
||||||
|
|
||||||
/* forward declarations */
|
/* forward declarations */
|
||||||
static void d3d_calculate_rect(d3d_video_t *d3d,
|
static void d3d_calculate_rect(d3d_video_t *d3d,
|
||||||
unsigned width, unsigned height,
|
unsigned width, unsigned height,
|
||||||
|
@ -21,6 +21,11 @@
|
|||||||
#define _WIN32_WINNT 0x0500 //_WIN32_WINNT_WIN2K
|
#define _WIN32_WINNT 0x0500 //_WIN32_WINNT_WIN2K
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include <commdlg.h>
|
||||||
|
|
||||||
#include "../../driver.h"
|
#include "../../driver.h"
|
||||||
#include "../../dynamic.h"
|
#include "../../dynamic.h"
|
||||||
#include "../../runloop.h"
|
#include "../../runloop.h"
|
||||||
@ -29,12 +34,12 @@
|
|||||||
#include "../video_monitor.h"
|
#include "../video_monitor.h"
|
||||||
#include "../common/win32_common.h"
|
#include "../common/win32_common.h"
|
||||||
#include "../drivers_wm/win32_shader_dlg.h"
|
#include "../drivers_wm/win32_shader_dlg.h"
|
||||||
#include <windows.h>
|
|
||||||
#include <commdlg.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#define IDI_ICON 1
|
#define IDI_ICON 1
|
||||||
|
|
||||||
|
#ifndef MAX_MONITORS
|
||||||
#define MAX_MONITORS 9
|
#define MAX_MONITORS 9
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool g_use_hw_ctx;
|
static bool g_use_hw_ctx;
|
||||||
static HWND g_hwnd;
|
static HWND g_hwnd;
|
||||||
|
@ -102,7 +102,7 @@ extern int g_xinput_pad_indexes[MAX_USERS];
|
|||||||
extern bool g_xinput_block_pads;
|
extern bool g_xinput_block_pads;
|
||||||
|
|
||||||
/* For xinput1_n.dll */
|
/* For xinput1_n.dll */
|
||||||
static HINSTANCE g_xinput_dll;
|
static dylib_t g_xinput_dll;
|
||||||
|
|
||||||
/* Function pointer, to be assigned with dylib_proc */
|
/* Function pointer, to be assigned with dylib_proc */
|
||||||
typedef uint32_t (__stdcall *XInputGetStateEx_t)(uint32_t, XINPUT_STATE*);
|
typedef uint32_t (__stdcall *XInputGetStateEx_t)(uint32_t, XINPUT_STATE*);
|
||||||
@ -171,11 +171,10 @@ static bool xinput_joypad_init(void *data)
|
|||||||
* success anyway.
|
* success anyway.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Using dylib_* complicates building joyconfig. */
|
g_xinput_dll = dylib_load("xinput1_4.dll");
|
||||||
g_xinput_dll = (HINSTANCE)dylib_load("xinput1_4.dll");
|
|
||||||
if (!g_xinput_dll)
|
if (!g_xinput_dll)
|
||||||
{
|
{
|
||||||
g_xinput_dll = (HINSTANCE)dylib_load("xinput1_3.dll");
|
g_xinput_dll = dylib_load("xinput1_3.dll");
|
||||||
version = "1.3";
|
version = "1.3";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -457,8 +456,8 @@ static bool xinput_joypad_rumble(unsigned pad,
|
|||||||
else if (effect == RETRO_RUMBLE_WEAK)
|
else if (effect == RETRO_RUMBLE_WEAK)
|
||||||
g_xinput_rumble_states[xuser].wRightMotorSpeed = strength;
|
g_xinput_rumble_states[xuser].wRightMotorSpeed = strength;
|
||||||
|
|
||||||
return g_XInputSetState(xuser, &g_xinput_rumble_states[xuser])
|
return (g_XInputSetState(xuser, &g_xinput_rumble_states[xuser])
|
||||||
== ERROR_SUCCESS;
|
== 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
input_device_driver_t xinput_joypad = {
|
input_device_driver_t xinput_joypad = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user