mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-19 15:58:43 +00:00
Optimised code
This commit is contained in:
parent
f2932352e5
commit
c4a0d61c90
1 changed files with 9 additions and 23 deletions
|
@ -1565,6 +1565,10 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* buffer, int request_length)
|
||||||
{
|
{
|
||||||
unsigned char player_data[3] = {0, 0, 0};
|
unsigned char player_data[3] = {0, 0, 0};
|
||||||
|
|
||||||
|
// Service button
|
||||||
|
if (PadStatus.switches & PAD_SWITCH_SERVICE)
|
||||||
|
player_data[0] |= 0x40;
|
||||||
|
|
||||||
switch (AMMediaboard::GetGameType())
|
switch (AMMediaboard::GetGameType())
|
||||||
{
|
{
|
||||||
// Controller configuration for F-Zero AX (DX)
|
// Controller configuration for F-Zero AX (DX)
|
||||||
|
@ -1580,9 +1584,6 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* buffer, int request_length)
|
||||||
// Start
|
// Start
|
||||||
if (PadStatus.button & PAD_BUTTON_START)
|
if (PadStatus.button & PAD_BUTTON_START)
|
||||||
player_data[0] |= 0x80;
|
player_data[0] |= 0x80;
|
||||||
// Service button
|
|
||||||
if (PadStatus.switches&PAD_SWITCH_SERVICE)
|
|
||||||
player_data[0] |= 0x40;
|
|
||||||
// Boost
|
// Boost
|
||||||
if (PadStatus.button & PAD_BUTTON_Y)
|
if (PadStatus.button & PAD_BUTTON_Y)
|
||||||
player_data[0] |= 0x02;
|
player_data[0] |= 0x02;
|
||||||
|
@ -1638,9 +1639,6 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* buffer, int request_length)
|
||||||
// Start
|
// Start
|
||||||
if (PadStatus.button & PAD_BUTTON_START)
|
if (PadStatus.button & PAD_BUTTON_START)
|
||||||
player_data[0] |= 0x80;
|
player_data[0] |= 0x80;
|
||||||
// Service button
|
|
||||||
if (PadStatus.switches&PAD_SWITCH_SERVICE)
|
|
||||||
player_data[0] |= 0x40;
|
|
||||||
// Boost
|
// Boost
|
||||||
if (PadStatus.button & PAD_BUTTON_Y)
|
if (PadStatus.button & PAD_BUTTON_Y)
|
||||||
player_data[0] |= 0x02;
|
player_data[0] |= 0x02;
|
||||||
|
@ -1688,9 +1686,6 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* buffer, int request_length)
|
||||||
// Start
|
// Start
|
||||||
if (PadStatus.button & PAD_BUTTON_START)
|
if (PadStatus.button & PAD_BUTTON_START)
|
||||||
player_data[0] |= 0x80;
|
player_data[0] |= 0x80;
|
||||||
// Service button
|
|
||||||
if (PadStatus.switches&PAD_SWITCH_SERVICE)
|
|
||||||
player_data[0] |= 0x40;
|
|
||||||
// Long Pass
|
// Long Pass
|
||||||
if (PadStatus.button & PAD_TRIGGER_L)
|
if (PadStatus.button & PAD_TRIGGER_L)
|
||||||
player_data[0] |= 0x01;
|
player_data[0] |= 0x01;
|
||||||
|
@ -1720,9 +1715,6 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* buffer, int request_length)
|
||||||
// Start
|
// Start
|
||||||
if (PadStatus.button & PAD_BUTTON_START)
|
if (PadStatus.button & PAD_BUTTON_START)
|
||||||
player_data[0] |= 0x80;
|
player_data[0] |= 0x80;
|
||||||
// Service button
|
|
||||||
if (PadStatus.switches&PAD_SWITCH_SERVICE)
|
|
||||||
player_data[0] |= 0x40;
|
|
||||||
// Long Pass
|
// Long Pass
|
||||||
if (PadStatus.button & PAD_TRIGGER_L)
|
if (PadStatus.button & PAD_TRIGGER_L)
|
||||||
player_data[0] |= 0x01;
|
player_data[0] |= 0x01;
|
||||||
|
@ -1761,9 +1753,6 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* buffer, int request_length)
|
||||||
// Start
|
// Start
|
||||||
if (PadStatus.button & PAD_BUTTON_START)
|
if (PadStatus.button & PAD_BUTTON_START)
|
||||||
player_data[0] |= 0x80;
|
player_data[0] |= 0x80;
|
||||||
// Service button
|
|
||||||
if (PadStatus.switches&PAD_SWITCH_SERVICE)
|
|
||||||
player_data[0] |= 0x40;
|
|
||||||
// A
|
// A
|
||||||
if (PadStatus.button & PAD_BUTTON_B)
|
if (PadStatus.button & PAD_BUTTON_B)
|
||||||
player_data[0] |= 0x01;
|
player_data[0] |= 0x01;
|
||||||
|
@ -1812,9 +1801,6 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* buffer, int request_length)
|
||||||
// Debug On
|
// Debug On
|
||||||
if (PadStatus.button & PAD_BUTTON_START)
|
if (PadStatus.button & PAD_BUTTON_START)
|
||||||
player_data[0] |= 0x80;
|
player_data[0] |= 0x80;
|
||||||
// Service button
|
|
||||||
if (PadStatus.switches&PAD_SWITCH_SERVICE)
|
|
||||||
player_data[0] |= 0x40;
|
|
||||||
// Switch 1
|
// Switch 1
|
||||||
if (PadStatus.button & PAD_BUTTON_A)
|
if (PadStatus.button & PAD_BUTTON_A)
|
||||||
player_data[0] |= 0x04;
|
player_data[0] |= 0x04;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue