Temp commenting out code that didn't work on SDL2
This commit is contained in:
parent
86cd7bf883
commit
0afa4b930e
1 changed files with 36 additions and 36 deletions
|
@ -422,42 +422,42 @@ static void read_joystick (void)
|
||||||
// First handle fake joystick from pandora...
|
// First handle fake joystick from pandora...
|
||||||
if(currprefs.jports[joyid].id == JSEM_JOYS)
|
if(currprefs.jports[joyid].id == JSEM_JOYS)
|
||||||
{
|
{
|
||||||
// Uint8 *keystate = SDL_GetKeyState(NULL);
|
//// Uint8 *keystate = SDL_GetKeyState(NULL);
|
||||||
const Uint8 *keystate = SDL_GetKeyboardState(NULL);
|
// const Uint8 *keystate = SDL_GetKeyboardState(NULL);
|
||||||
|
//
|
||||||
if(!keystate[VK_R])
|
// if(!keystate[VK_R])
|
||||||
{ // Right shoulder + dPad -> cursor keys
|
// { // Right shoulder + dPad -> cursor keys
|
||||||
int axis = (keystate[VK_LEFT] ? -32767 : (keystate[VK_RIGHT] ? 32767 : 0));
|
// int axis = (keystate[VK_LEFT] ? -32767 : (keystate[VK_RIGHT] ? 32767 : 0));
|
||||||
if(!joyXviaCustom)
|
// if(!joyXviaCustom)
|
||||||
setjoystickstate (0, 0, axis, 32767);
|
// setjoystickstate (0, 0, axis, 32767);
|
||||||
axis = (keystate[VK_UP] ? -32767 : (keystate[VK_DOWN] ? 32767 : 0));
|
// axis = (keystate[VK_UP] ? -32767 : (keystate[VK_DOWN] ? 32767 : 0));
|
||||||
if(!joyYviaCustom)
|
// if(!joyYviaCustom)
|
||||||
setjoystickstate (0, 1, axis, 32767);
|
// setjoystickstate (0, 1, axis, 32767);
|
||||||
}
|
// }
|
||||||
if(!joyButXviaCustom[0])
|
// if(!joyButXviaCustom[0])
|
||||||
setjoybuttonstate (0, 0, keystate[VK_X]);
|
// setjoybuttonstate (0, 0, keystate[VK_X]);
|
||||||
if(!joyButXviaCustom[1])
|
// if(!joyButXviaCustom[1])
|
||||||
setjoybuttonstate (0, 1, keystate[VK_B]);
|
// setjoybuttonstate (0, 1, keystate[VK_B]);
|
||||||
if(!joyButXviaCustom[2])
|
// if(!joyButXviaCustom[2])
|
||||||
setjoybuttonstate (0, 2, keystate[VK_A]);
|
// setjoybuttonstate (0, 2, keystate[VK_A]);
|
||||||
if(!joyButXviaCustom[3])
|
// if(!joyButXviaCustom[3])
|
||||||
setjoybuttonstate (0, 3, keystate[VK_Y]);
|
// setjoybuttonstate (0, 3, keystate[VK_Y]);
|
||||||
|
//
|
||||||
int cd32_start = 0, cd32_ffw = 0, cd32_rwd = 0;
|
// int cd32_start = 0, cd32_ffw = 0, cd32_rwd = 0;
|
||||||
if(keystate[SDLK_LALT]) { // Pandora Start button
|
// if(keystate[SDLK_LALT]) { // Pandora Start button
|
||||||
if(keystate[VK_L]) // Left shoulder
|
// if(keystate[VK_L]) // Left shoulder
|
||||||
cd32_rwd = 1;
|
// cd32_rwd = 1;
|
||||||
else if (keystate[VK_R]) // Right shoulder
|
// else if (keystate[VK_R]) // Right shoulder
|
||||||
cd32_ffw = 1;
|
// cd32_ffw = 1;
|
||||||
else
|
// else
|
||||||
cd32_start = 1;
|
// cd32_start = 1;
|
||||||
}
|
// }
|
||||||
if(!joyButXviaCustom[6])
|
// if(!joyButXviaCustom[6])
|
||||||
setjoybuttonstate (0, 6, cd32_start);
|
// setjoybuttonstate (0, 6, cd32_start);
|
||||||
if(!joyButXviaCustom[5])
|
// if(!joyButXviaCustom[5])
|
||||||
setjoybuttonstate (0, 5, cd32_ffw);
|
// setjoybuttonstate (0, 5, cd32_ffw);
|
||||||
if(!joyButXviaCustom[4])
|
// if(!joyButXviaCustom[4])
|
||||||
setjoybuttonstate (0, 4, cd32_rwd);
|
// setjoybuttonstate (0, 4, cd32_rwd);
|
||||||
}
|
}
|
||||||
else if (jsem_isjoy(joyid,&currprefs) != -1)
|
else if (jsem_isjoy(joyid,&currprefs) != -1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue