mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 12:35:23 +00:00
Create slimmed down dinput8.h header for DirectInput8 - and use
it when HAVE_DXGUID is not defined
This commit is contained in:
parent
0d8b119d25
commit
ba4990fb92
@ -18,18 +18,27 @@
|
||||
#pragma comment(lib, "dinput8")
|
||||
#endif
|
||||
|
||||
#undef DIRECTINPUT_VERSION
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
|
||||
#include <dinput.h>
|
||||
#include <dbt.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DXGUID
|
||||
#undef DIRECTINPUT_VERSION
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#include <dinput.h>
|
||||
#else
|
||||
#include "../include/dinput8.h"
|
||||
#endif
|
||||
#include <dbt.h>
|
||||
|
||||
#include <windowsx.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#ifndef WM_MOUSEHWHEEL
|
||||
#define WM_MOUSEHWHEEL 0x20e
|
||||
@ -39,12 +48,6 @@
|
||||
#define WM_MOUSEWHEEL 0x020A
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#ifndef _XBOX
|
||||
#include "../../gfx/common/win32_common.h"
|
||||
|
||||
@ -135,12 +138,12 @@ bool dinput_init_context(void)
|
||||
/* Who said we shouldn't have same call signature in a COM API? <_< */
|
||||
#ifdef __cplusplus
|
||||
if (!(SUCCEEDED(DirectInput8Create(
|
||||
GetModuleHandle(NULL), DIRECTINPUT_VERSION,
|
||||
GetModuleHandle(NULL), 0x0800,
|
||||
IID_IDirectInput8,
|
||||
(void**)&g_dinput_ctx, NULL))))
|
||||
#else
|
||||
if (!(SUCCEEDED(DirectInput8Create(
|
||||
GetModuleHandle(NULL), DIRECTINPUT_VERSION,
|
||||
GetModuleHandle(NULL), 0x0800,
|
||||
&IID_IDirectInput8,
|
||||
(void**)&g_dinput_ctx, NULL))))
|
||||
#endif
|
||||
|
@ -19,16 +19,21 @@
|
||||
#include <string.h>
|
||||
#include <windowsx.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DXGUID
|
||||
#include <dinput.h>
|
||||
#else
|
||||
#include "../include/dinput8.h"
|
||||
#endif
|
||||
#include <mmsystem.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <compat/strl.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../input_keymaps.h"
|
||||
|
@ -21,7 +21,15 @@
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DXGUID
|
||||
#include <dinput.h>
|
||||
#else
|
||||
#include "../include/dinput8.h"
|
||||
#endif
|
||||
|
||||
/* For DIJOYSTATE2 struct, rgbButtons will always have 128 elements */
|
||||
#define ARRAY_SIZE_RGB_BUTTONS 128
|
||||
|
@ -22,7 +22,17 @@
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <windowsx.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DXGUID
|
||||
#include <dinput.h>
|
||||
#else
|
||||
#include "../include/dinput8.h"
|
||||
#endif
|
||||
|
||||
#include <mmsystem.h>
|
||||
|
||||
static void dinput_joypad_poll(void)
|
||||
|
@ -22,7 +22,17 @@
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <windowsx.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DXGUID
|
||||
#include <dinput.h>
|
||||
#else
|
||||
#include "../include/dinput8.h"
|
||||
#endif
|
||||
|
||||
#include <mmsystem.h>
|
||||
|
||||
/* Forward declaration */
|
||||
|
2108
input/include/dinput8.h
Normal file
2108
input/include/dinput8.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -64,10 +64,13 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DINPUT
|
||||
#ifdef HAVE_DXGUID
|
||||
#undef DIRECTINPUT_VERSION
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
|
||||
#include <dinput.h>
|
||||
#else
|
||||
#include "include/dinput8.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "input_keymaps.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user