(Win32) More buildfixes

This commit is contained in:
twinaphex 2015-09-05 14:10:16 +02:00
parent b2f022ae30
commit 3e977034a7
3 changed files with 17 additions and 14 deletions

View File

@ -21,6 +21,9 @@
#endif
#include <formats/image.h>
#include <compat/strl.h>
#include <compat/posix_string.h>
#include <file/file_path.h>
#include "d3d.h"
#include "../video_viewport.h"
@ -29,14 +32,12 @@
#include "render_chain_driver.h"
#include "../common/win32_common.h"
#ifndef _XBOX
#ifndef _XBOX
#define HAVE_MONITOR
#define HAVE_WINDOW
#endif
#include <compat/posix_string.h>
#include <file/file_path.h>
#include "../../performance.h"
#include "d3d_defines.h"
@ -52,8 +53,6 @@
#endif
#endif
#include <dynamic/dylib.h>
/* forward declarations */
static void d3d_calculate_rect(d3d_video_t *d3d,
unsigned width, unsigned height,

View File

@ -21,6 +21,11 @@
#define _WIN32_WINNT 0x0500 //_WIN32_WINNT_WIN2K
#endif
#include <string.h>
#include <windows.h>
#include <commdlg.h>
#include "../../driver.h"
#include "../../dynamic.h"
#include "../../runloop.h"
@ -29,12 +34,12 @@
#include "../video_monitor.h"
#include "../common/win32_common.h"
#include "../drivers_wm/win32_shader_dlg.h"
#include <windows.h>
#include <commdlg.h>
#include <string.h>
#define IDI_ICON 1
#ifndef MAX_MONITORS
#define MAX_MONITORS 9
#endif
static bool g_use_hw_ctx;
static HWND g_hwnd;

View File

@ -102,7 +102,7 @@ extern int g_xinput_pad_indexes[MAX_USERS];
extern bool g_xinput_block_pads;
/* For xinput1_n.dll */
static HINSTANCE g_xinput_dll;
static dylib_t g_xinput_dll;
/* Function pointer, to be assigned with dylib_proc */
typedef uint32_t (__stdcall *XInputGetStateEx_t)(uint32_t, XINPUT_STATE*);
@ -171,11 +171,10 @@ static bool xinput_joypad_init(void *data)
* success anyway.
*/
/* Using dylib_* complicates building joyconfig. */
g_xinput_dll = (HINSTANCE)dylib_load("xinput1_4.dll");
g_xinput_dll = dylib_load("xinput1_4.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";
}
@ -457,8 +456,8 @@ static bool xinput_joypad_rumble(unsigned pad,
else if (effect == RETRO_RUMBLE_WEAK)
g_xinput_rumble_states[xuser].wRightMotorSpeed = strength;
return g_XInputSetState(xuser, &g_xinput_rumble_states[xuser])
== ERROR_SUCCESS;
return (g_XInputSetState(xuser, &g_xinput_rumble_states[xuser])
== 0);
}
input_device_driver_t xinput_joypad = {