Compile fix, remove PanicAlert from nJoy SDL
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1697 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
3db9fb4fc1
commit
fb5b4d026a
|
@ -30,7 +30,9 @@
|
||||||
#include "D3DPostprocess.h"
|
#include "D3DPostprocess.h"
|
||||||
#include "D3DUtil.h"
|
#include "D3DUtil.h"
|
||||||
#include "VertexShaderManager.h"
|
#include "VertexShaderManager.h"
|
||||||
|
#include "VertexShaderCache.h"
|
||||||
#include "PixelShaderManager.h"
|
#include "PixelShaderManager.h"
|
||||||
|
#include "PixelShaderCache.h"
|
||||||
#include "TextureCache.h"
|
#include "TextureCache.h"
|
||||||
#include "Utils.h"
|
#include "Utils.h"
|
||||||
#include "EmuWindow.h"
|
#include "EmuWindow.h"
|
||||||
|
|
|
@ -28,7 +28,9 @@
|
||||||
#include "BPStructs.h"
|
#include "BPStructs.h"
|
||||||
#include "XFStructs.h"
|
#include "XFStructs.h"
|
||||||
#include "VertexShaderManager.h"
|
#include "VertexShaderManager.h"
|
||||||
|
#include "VertexShaderCache.h"
|
||||||
#include "PixelShaderManager.h"
|
#include "PixelShaderManager.h"
|
||||||
|
#include "PixelShaderCache.h"
|
||||||
#include "Utils.h"
|
#include "Utils.h"
|
||||||
|
|
||||||
using namespace D3D;
|
using namespace D3D;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Project description
|
// Project description
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
//
|
||||||
// Name: nJoy
|
// Name: nJoy
|
||||||
// Description: A Dolphin Compatible Input Plugin
|
// Description: A Dolphin Compatible Input Plugin
|
||||||
//
|
//
|
||||||
|
@ -32,13 +32,13 @@
|
||||||
|
|
||||||
////////////////////////
|
////////////////////////
|
||||||
// Include
|
// Include
|
||||||
// ¯¯¯¯¯¯¯¯¯
|
//
|
||||||
#include "nJoy.h"
|
#include "nJoy.h"
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Variables
|
// Variables
|
||||||
// ¯¯¯¯¯¯¯¯¯
|
//
|
||||||
|
|
||||||
// Rumble in windows
|
// Rumble in windows
|
||||||
#define _CONTROLLER_STATE_H // avoid certain declarations in nJoy.h
|
#define _CONTROLLER_STATE_H // avoid certain declarations in nJoy.h
|
||||||
|
@ -64,7 +64,7 @@ void __Logv(int log, int v, const char *format, ...) {}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// wxWidgets
|
// wxWidgets
|
||||||
// ¯¯¯¯¯¯¯¯¯
|
//
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
class wxDLLApp : public wxApp
|
class wxDLLApp : public wxApp
|
||||||
{
|
{
|
||||||
|
@ -81,7 +81,7 @@ void __Logv(int log, int v, const char *format, ...) {}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// DllMain
|
// DllMain
|
||||||
// ¯¯¯¯¯¯¯
|
//
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
BOOL APIENTRY DllMain( HINSTANCE hinstDLL, // DLL module handle
|
BOOL APIENTRY DllMain( HINSTANCE hinstDLL, // DLL module handle
|
||||||
DWORD dwReason, // reason called
|
DWORD dwReason, // reason called
|
||||||
|
@ -117,10 +117,10 @@ BOOL APIENTRY DllMain( HINSTANCE hinstDLL, // DLL module handle
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Input Plugin Functions (from spec's)
|
// Input Plugin Functions (from spec's)
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
//
|
||||||
|
|
||||||
// Get properties of plugin
|
// Get properties of plugin
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
//
|
||||||
void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||||
{
|
{
|
||||||
_PluginInfo->Version = 0x0100;
|
_PluginInfo->Version = 0x0100;
|
||||||
|
@ -138,7 +138,7 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call config dialog
|
// Call config dialog
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
//
|
||||||
void DllConfig(HWND _hParent)
|
void DllConfig(HWND _hParent)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -177,7 +177,7 @@ void DllDebugger(HWND _hParent, bool Show) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init PAD (start emulation)
|
// Init PAD (start emulation)
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
//
|
||||||
void PAD_Initialize(SPADInitialize _PADInitialize)
|
void PAD_Initialize(SPADInitialize _PADInitialize)
|
||||||
{
|
{
|
||||||
emulator_running = TRUE;
|
emulator_running = TRUE;
|
||||||
|
@ -212,7 +212,7 @@ void PAD_Initialize(SPADInitialize _PADInitialize)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shutdown PAD (stop emulation)
|
// Shutdown PAD (stop emulation)
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
//
|
||||||
void PAD_Shutdown()
|
void PAD_Shutdown()
|
||||||
{
|
{
|
||||||
if (joysticks[0].enabled)
|
if (joysticks[0].enabled)
|
||||||
|
@ -245,7 +245,7 @@ void PAD_Shutdown()
|
||||||
|
|
||||||
|
|
||||||
// Set PAD status
|
// Set PAD status
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
//
|
||||||
void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus)
|
void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus)
|
||||||
{
|
{
|
||||||
if (!joysticks[_numPAD].enabled)
|
if (!joysticks[_numPAD].enabled)
|
||||||
|
@ -365,7 +365,7 @@ void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus)
|
||||||
|
|
||||||
|
|
||||||
// Set PAD attached pads
|
// Set PAD attached pads
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
//
|
||||||
unsigned int PAD_GetAttachedPads()
|
unsigned int PAD_GetAttachedPads()
|
||||||
{
|
{
|
||||||
unsigned int connected = 0;
|
unsigned int connected = 0;
|
||||||
|
@ -388,10 +388,10 @@ unsigned int PAD_GetAttachedPads()
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Custom Functions
|
// Custom Functions
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
//
|
||||||
|
|
||||||
// Read buttons status. Called from GetJoyState().
|
// Read buttons status. Called from GetJoyState().
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
//
|
||||||
void ReadButton(int controller, int button)
|
void ReadButton(int controller, int button)
|
||||||
{
|
{
|
||||||
int ctl_button = joysticks[controller].buttons[button];
|
int ctl_button = joysticks[controller].buttons[button];
|
||||||
|
@ -402,7 +402,7 @@ void ReadButton(int controller, int button)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Request joystick state
|
// Request joystick state
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
//
|
||||||
void GetJoyState(int controller)
|
void GetJoyState(int controller)
|
||||||
{
|
{
|
||||||
SDL_JoystickUpdate();
|
SDL_JoystickUpdate();
|
||||||
|
@ -420,8 +420,8 @@ void GetJoyState(int controller)
|
||||||
ReadButton(controller, CTL_Y_BUTTON);
|
ReadButton(controller, CTL_Y_BUTTON);
|
||||||
ReadButton(controller, CTL_Z_TRIGGER);
|
ReadButton(controller, CTL_Z_TRIGGER);
|
||||||
ReadButton(controller, CTL_START);
|
ReadButton(controller, CTL_START);
|
||||||
|
// Is there a purpose to this alert?
|
||||||
PanicAlert("%i", CTL_A_BUTTON);
|
// PanicAlert("%i", CTL_A_BUTTON);
|
||||||
|
|
||||||
//
|
//
|
||||||
if (joysticks[controller].halfpress < joyinfo[controller].NumButtons)
|
if (joysticks[controller].halfpress < joyinfo[controller].NumButtons)
|
||||||
|
@ -442,7 +442,7 @@ void GetJoyState(int controller)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search attached devices
|
// Search attached devices
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
//
|
||||||
int Search_Devices()
|
int Search_Devices()
|
||||||
{
|
{
|
||||||
// load config
|
// load config
|
||||||
|
@ -475,7 +475,7 @@ int Search_Devices()
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
fprintf(pFile, "Scanning for devices\n");
|
fprintf(pFile, "Scanning for devices\n");
|
||||||
fprintf(pFile, "¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n");
|
fprintf(pFile, "\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for(int i = 0; i < numjoy; i++ )
|
for(int i = 0; i < numjoy; i++ )
|
||||||
|
|
Loading…
Reference in New Issue