UWP: Hook up basic touch/mouse input. Start work on loading from a StorageFile. Getting closer to starting to boot a game

This commit is contained in:
Henrik Rydgard authored and Henrik Rydgård committed 2017-03-23 10:02:28 +01:00
1 parent 86f4559748
commit 4ced81b1df
22 files changed
+630 -38

No files matched your search

+15 -1
View File
@@ -1,4 +1,6 @@
#include <limits.h>
#include "ppsspp_config.h"
#include <climits>
#include <algorithm>
#include "base/NativeApp.h"
@@ -11,6 +13,8 @@
// Utilities to dynamically load XInput. Adapted from SDL.
#if !PPSSPP_PLATFORM(UWP)
typedef DWORD (WINAPI *XInputGetState_t) (DWORD dwUserIndex, XINPUT_STATE* pState);
typedef DWORD (WINAPI *XInputSetState_t) (DWORD dwUserIndex, XINPUT_VIBRATION* pVibration);
typedef DWORD (WINAPI *XInputGetCapabilities_t) (DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES* pCapabilities);
@@ -66,6 +70,14 @@ static void UnloadXInputDLL() {
}
}
#else
static int LoadXInputDLL() { return 0; }
static void UnloadXInputDLL() {}
#define PPSSPP_XInputGetState XInputGetState
#define PPSSPP_XInputSetState XInputSetState
#define PPSSPP_XInputGetCapabilities XInputGetCapabilities
#endif
#ifndef XUSER_MAX_COUNT
#define XUSER_MAX_COUNT 4
#endif
@@ -201,8 +213,10 @@ bool NormalizedDeadzoneDiffers(u8 x1, u8 x2, const u8 thresh) {
}
int XinputDevice::UpdateState() {
#if !PPSSPP_PLATFORM(UWP)
if (!s_pXInputDLL)
return 0;
#endif
bool anySuccess = false;
for (int i = 0; i < XUSER_MAX_COUNT; i++) {