mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-30 22:44:22 +01:00
add sfc ext support, fix broken cc analog stick
This commit is contained in:
parent
b6273051f8
commit
8ce34860a3
@ -283,7 +283,9 @@ bool IsValidROM(int method)
|
|||||||
|
|
||||||
if(p != NULL)
|
if(p != NULL)
|
||||||
{
|
{
|
||||||
if (stricmp(p, ".smc") == 0 || stricmp(p, ".fig") == 0)
|
if (stricmp(p, ".smc") == 0 ||
|
||||||
|
stricmp(p, ".fig") == 0 ||
|
||||||
|
stricmp(p, ".sfc") == 0)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -299,13 +299,33 @@ void decodepad (int pad)
|
|||||||
{
|
{
|
||||||
/*** we don't want division by zero ***/
|
/*** we don't want division by zero ***/
|
||||||
if (wm_ax > 0 && wm_ay == 0)
|
if (wm_ax > 0 && wm_ay == 0)
|
||||||
wp |= WPAD_BUTTON_RIGHT;
|
{
|
||||||
|
if(exp_type == WPAD_EXP_CLASSIC)
|
||||||
|
wp |= WPAD_CLASSIC_BUTTON_RIGHT;
|
||||||
|
else
|
||||||
|
wp |= WPAD_BUTTON_RIGHT;
|
||||||
|
}
|
||||||
if (wm_ax < 0 && wm_ay == 0)
|
if (wm_ax < 0 && wm_ay == 0)
|
||||||
wp |= WPAD_BUTTON_LEFT;
|
{
|
||||||
|
if(exp_type == WPAD_EXP_CLASSIC)
|
||||||
|
wp |= WPAD_CLASSIC_BUTTON_LEFT;
|
||||||
|
else
|
||||||
|
wp |= WPAD_BUTTON_LEFT;
|
||||||
|
}
|
||||||
if (wm_ax == 0 && wm_ay > 0)
|
if (wm_ax == 0 && wm_ay > 0)
|
||||||
wp |= WPAD_BUTTON_UP;
|
{
|
||||||
|
if(exp_type == WPAD_EXP_CLASSIC)
|
||||||
|
wp |= WPAD_CLASSIC_BUTTON_UP;
|
||||||
|
else
|
||||||
|
wp |= WPAD_BUTTON_UP;
|
||||||
|
}
|
||||||
if (wm_ax == 0 && wm_ay < 0)
|
if (wm_ax == 0 && wm_ay < 0)
|
||||||
wp |= WPAD_BUTTON_DOWN;
|
{
|
||||||
|
if(exp_type == WPAD_EXP_CLASSIC)
|
||||||
|
wp |= WPAD_CLASSIC_BUTTON_DOWN;
|
||||||
|
else
|
||||||
|
wp |= WPAD_BUTTON_DOWN;
|
||||||
|
}
|
||||||
|
|
||||||
if (wm_ax != 0 && wm_ay != 0)
|
if (wm_ax != 0 && wm_ay != 0)
|
||||||
{
|
{
|
||||||
@ -314,9 +334,19 @@ void decodepad (int pad)
|
|||||||
if (t >= -2.41421356237 && t < 2.41421356237)
|
if (t >= -2.41421356237 && t < 2.41421356237)
|
||||||
{
|
{
|
||||||
if (wm_ax >= 0)
|
if (wm_ax >= 0)
|
||||||
wp |= WPAD_BUTTON_RIGHT;
|
{
|
||||||
|
if(exp_type == WPAD_EXP_CLASSIC)
|
||||||
|
wp |= WPAD_CLASSIC_BUTTON_RIGHT;
|
||||||
|
else
|
||||||
|
wp |= WPAD_BUTTON_RIGHT;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
wp |= WPAD_BUTTON_LEFT;
|
{
|
||||||
|
if(exp_type == WPAD_EXP_CLASSIC)
|
||||||
|
wp |= WPAD_CLASSIC_BUTTON_LEFT;
|
||||||
|
else
|
||||||
|
wp |= WPAD_BUTTON_LEFT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** Recalc up / down ***/
|
/*** Recalc up / down ***/
|
||||||
@ -324,9 +354,19 @@ void decodepad (int pad)
|
|||||||
if (t >= -2.41421356237 && t < 2.41421356237)
|
if (t >= -2.41421356237 && t < 2.41421356237)
|
||||||
{
|
{
|
||||||
if (wm_ay >= 0)
|
if (wm_ay >= 0)
|
||||||
wp |= WPAD_BUTTON_UP;
|
{
|
||||||
|
if(exp_type == WPAD_EXP_CLASSIC)
|
||||||
|
wp |= WPAD_CLASSIC_BUTTON_UP;
|
||||||
|
else
|
||||||
|
wp |= WPAD_BUTTON_UP;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
wp |= WPAD_BUTTON_DOWN;
|
{
|
||||||
|
if(exp_type == WPAD_EXP_CLASSIC)
|
||||||
|
wp |= WPAD_CLASSIC_BUTTON_DOWN;
|
||||||
|
else
|
||||||
|
wp |= WPAD_BUTTON_DOWN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user