mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-19 19:34:57 +00:00
Removing obsolete build options
The game cannot work with those anyhow... ```c #undef BBGE_BUILD_IRRKLANG #undef BBGE_BUILD_OPENALOGG #undef BBGE_BUILD_XINPUT #undef BBGE_BUILD_DELAYXINPUT ```
This commit is contained in:
parent
9617bde3ec
commit
91c493344d
3 changed files with 2 additions and 112 deletions
|
@ -21,51 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "Core.h"
|
#include "Core.h"
|
||||||
|
|
||||||
#if defined(BBGE_BUILD_WINDOWS) && defined(BBGE_BUILD_XINPUT)
|
|
||||||
#include "Xinput.h"
|
|
||||||
|
|
||||||
#if defined(BBGE_BUILD_DELAYXINPUT)
|
|
||||||
#include <DelayImp.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
HRESULT (WINAPI *XInputGetState)(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID *ppvOut, LPUNKNOWN punkOuter) = 0;
|
|
||||||
|
|
||||||
if ( (winp.hInstDI = LoadLibrary( "dinput.dll" )) == 0 )
|
|
||||||
|
|
||||||
|
|
||||||
if (!pDirectInput8Create) {
|
|
||||||
pDirectInput8Create = (HRESULT (__stdcall *)(HINSTANCE, DWORD ,REFIID, LPVOID *, LPUNKNOWN)) GetProcAddress(winp.hInstDI,"DirectInput8Create");
|
|
||||||
|
|
||||||
if (!pDirectInput8Create) {
|
|
||||||
error(L"Couldn't get DI proc addr\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool importXInput()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool tryXInput()
|
|
||||||
{
|
|
||||||
__try
|
|
||||||
{
|
|
||||||
XINPUT_STATE xinp;
|
|
||||||
XInputGetState(0, &xinp);
|
|
||||||
}
|
|
||||||
__except (EXCEPTION_EXECUTE_HANDLER)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __LINUX__
|
#ifdef __LINUX__
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -217,17 +172,6 @@ void Joystick::init(int stick)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BBGE_BUILD_XINPUT
|
|
||||||
debugLog("about to init xinput");
|
|
||||||
|
|
||||||
xinited = tryXInput();
|
|
||||||
|
|
||||||
if (!xinited)
|
|
||||||
debugLog("XInput not found, not installed?");
|
|
||||||
|
|
||||||
debugLog("after catch");
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Joystick::shutdown()
|
void Joystick::shutdown()
|
||||||
|
@ -281,25 +225,6 @@ void Joystick::rumble(float leftMotor, float rightMotor, float time)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(BBGE_BUILD_WINDOWS) && defined(BBGE_BUILD_XINPUT)
|
|
||||||
XINPUT_VIBRATION vib;
|
|
||||||
vib.wLeftMotorSpeed = WORD(leftMotor*65535);
|
|
||||||
vib.wRightMotorSpeed = WORD(rightMotor*65535);
|
|
||||||
|
|
||||||
clearRumbleTime = time;
|
|
||||||
DWORD d = XInputSetState(0, &vib);
|
|
||||||
if (d == ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
//debugLog("success");
|
|
||||||
}
|
|
||||||
else if (d == ERROR_DEVICE_NOT_CONNECTED)
|
|
||||||
{
|
|
||||||
//debugLog("joystick not connected");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//unknown error
|
|
||||||
}
|
|
||||||
#elif defined(__LINUX__)
|
#elif defined(__LINUX__)
|
||||||
if (eventfd >= 0) {
|
if (eventfd >= 0) {
|
||||||
struct ff_effect effect;
|
struct ff_effect effect;
|
||||||
|
@ -497,34 +422,6 @@ void Joystick::update(float dt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(BBGE_BUILD_WINDOWS) && defined(BBGE_BUILD_XINPUT)
|
|
||||||
if (inited && xinited)
|
|
||||||
{
|
|
||||||
XINPUT_STATE xinp;
|
|
||||||
XInputGetState(0, &xinp);
|
|
||||||
|
|
||||||
leftTrigger = float(xinp.Gamepad.bLeftTrigger)/255.0f;
|
|
||||||
rightTrigger = float(xinp.Gamepad.bRightTrigger)/255.0f;
|
|
||||||
|
|
||||||
leftShoulder = xinp.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_SHOULDER;
|
|
||||||
rightShoulder = xinp.Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_SHOULDER;
|
|
||||||
|
|
||||||
leftThumb = xinp.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB;
|
|
||||||
rightThumb = xinp.Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB;
|
|
||||||
|
|
||||||
dpadUp = xinp.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_UP;
|
|
||||||
dpadDown = xinp.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_DOWN;
|
|
||||||
dpadLeft = xinp.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_LEFT;
|
|
||||||
dpadRight = xinp.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_RIGHT;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
btnStart = xinp.Gamepad.wButtons & XINPUT_GAMEPAD_START;
|
|
||||||
btnSelect = xinp.Gamepad.wButtons & XINPUT_GAMEPAD_BACK;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1214,9 +1214,6 @@ bool SoundManager::playMusic(const std::string &name, SoundLoopType slt, SoundFa
|
||||||
{
|
{
|
||||||
if (isPlayingMusic(name))
|
if (isPlayingMusic(name))
|
||||||
{
|
{
|
||||||
#ifdef BBGE_BUILD_OPENALOGG
|
|
||||||
if (masterSoundLock) SDL_mutexV(masterSoundLock);
|
|
||||||
#endif
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#define BBGE_BUILD_FMODEX
|
#define BBGE_BUILD_FMODEX
|
||||||
|
|
||||||
#ifdef BBGE_BUILD_OPENALOGG
|
#ifdef BBGE_BUILD_FMODEX
|
||||||
const int BBGE_AUDIO_NOCHANNEL = -1;
|
|
||||||
#elif defined(BBGE_BUILD_FMODEX)
|
|
||||||
const int BBGE_AUDIO_NOCHANNEL = 0;
|
const int BBGE_AUDIO_NOCHANNEL = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -40,9 +38,7 @@ const int BBGE_AUDIO_LOOPNONE = 0;
|
||||||
|
|
||||||
namespace SoundCore
|
namespace SoundCore
|
||||||
{
|
{
|
||||||
#if defined(BBGE_BUILD_OPENALOGG)
|
#ifdef BBGE_BUILD_FMODEX
|
||||||
//struct Buffer;
|
|
||||||
#elif defined(BBGE_BUILD_FMODEX)
|
|
||||||
typedef void *Buffer;
|
typedef void *Buffer;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue