Fixed some incorrect Pandora platform options and references

This commit is contained in:
Dimitris Panokostas 2017-12-26 13:23:22 +01:00
parent f12b298223
commit 66a2956a76
13 changed files with 82 additions and 111 deletions

View file

@ -1125,12 +1125,12 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
_stprintf (tmp1, _T("joyport%d_mode"), i);
cfgfile_dwrite_str (f, tmp1, joyportmodes[jp->mode]);
}
#ifndef PANDORA
if (jp->mousemap > 0) {
_stprintf (tmp1, _T("joyport%d_mousemap"), i);
cfgfile_dwrite_str (f, tmp1, mousemaps[jp->mousemap]);
}
#endif
}
if (jp->idc.name[0]) {
_stprintf (tmp1, _T("joyport%d_friendlyname"), i);
cfgfile_write (f, tmp1, jp->idc.name);
@ -1147,7 +1147,6 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
}
}
#ifndef PANDORA
// custom options SAVING
if (i < 4 ) {
@ -1201,7 +1200,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
cfgfile_dwrite_str (f, tmp1, tmp2); }
}
}
#endif
cfg_write (_T("; "), f);
}
@ -1945,10 +1944,7 @@ static int cfgfile_parse_host(struct uae_prefs *p, TCHAR *option, TCHAR *value)
return 1;
}
#ifndef PANDORA
// custom options LOADING
for (int i = 0; i<4; ++i) // Loop 1 ... all 4 joyports
{
struct joypad_map_layout tempcustom = {};
@ -2000,9 +1996,6 @@ static int cfgfile_parse_host(struct uae_prefs *p, TCHAR *option, TCHAR *value)
} // close loop 2
} // close loop 1
#endif
for (tmpp = option; *tmpp != '\0'; tmpp++)
if (_istupper(*tmpp))
*tmpp = _totlower(*tmpp);
@ -2257,13 +2250,10 @@ static int cfgfile_parse_host(struct uae_prefs *p, TCHAR *option, TCHAR *value)
cfgfile_strval(option, value, _T("joyport3_autofire"), &p->jports[3].autofire, joyaf, 0))
return 1;
#ifndef PANDORA
if (cfgfile_strval(option, value, _T("joyport0_mousemap"), &p->jports[0].mousemap, mousemaps, 0))
return 1;
if (cfgfile_strval(option, value, _T("joyport1_mousemap"), &p->jports[1].mousemap, mousemaps, 0))
return 1;
#endif
// shared version
if (cfgfile_yesno(option, value, _T("joyport0keyboardoverride"), &vb) ||

View file

@ -164,13 +164,8 @@ enum aks {
AKS_QUALIFIER5, AKS_QUALIFIER6, AKS_QUALIFIER7, AKS_QUALIFIER8,
AKS_QUALIFIER_SPECIAL, AKS_QUALIFIER_SHIFT, AKS_QUALIFIER_CONTROL,
AKS_QUALIFIER_ALT, AKS_QUALIFIER_WIN,
#ifndef PANDORA
AKS_MOUSEMAP_PORT0_LEFT, AKS_MOUSEMAP_PORT0_RIGHT, AKS_MOUSEMAP_PORT1_LEFT, AKS_MOUSEMAP_PORT1_RIGHT,
#endif
AKS_MOUSE_SPEED_DOWN, AKS_MOUSE_SPEED_UP
AKS_MOUSEMAP_PORT0_LEFT, AKS_MOUSEMAP_PORT0_RIGHT, AKS_MOUSEMAP_PORT1_LEFT, AKS_MOUSEMAP_PORT1_RIGHT,
AKS_MOUSE_SPEED_DOWN, AKS_MOUSE_SPEED_UP
};
#define AKS_FIRST AKS_ENTERGUI

View file

@ -425,9 +425,9 @@ struct uae_prefs {
TCHAR quit_amiberry[256];
#ifdef PANDORA
int pandora_cpu_speed;
int pandora_hide_idle_led;
int pandora_tapDelay;
int cpu_speed;
int hide_idle_led;
int tapDelay;
#endif
/* input */

View file

@ -2574,7 +2574,7 @@ int i;
int num_elements;
static bool inputdevice_handle_inputcode2 (int code, int state)
static bool inputdevice_handle_inputcode2(int code, int state)
{
if (code == 0)
goto end;
@ -2582,66 +2582,62 @@ static bool inputdevice_handle_inputcode2 (int code, int state)
switch (code)
{
case AKS_ENTERGUI:
gui_display (-1);
gui_display(-1);
break;
#ifdef ACTION_REPLAY
case AKS_FREEZEBUTTON:
action_replay_freeze ();
action_replay_freeze();
break;
#endif
case AKS_QUIT:
uae_quit ();
uae_quit();
break;
case AKS_SOFTRESET:
uae_reset (0, 0);
uae_reset(0, 0);
break;
case AKS_HARDRESET:
uae_reset (1, 1);
uae_reset(1, 1);
break;
#ifndef PANDORA
case AKS_MOUSEMAP_PORT0_LEFT:
((changed_prefs.jports[0].mousemap) ^= 1 << 0);
inputdevice_updateconfig (&changed_prefs, &currprefs);
break;
case AKS_MOUSEMAP_PORT0_RIGHT:
((changed_prefs.jports[0].mousemap) ^= 1 << 1);
inputdevice_updateconfig (&changed_prefs, &currprefs);
break;
case AKS_MOUSEMAP_PORT1_LEFT:
((changed_prefs.jports[1].mousemap) ^= 1 << 0);
inputdevice_updateconfig (&changed_prefs, &currprefs);
break;
case AKS_MOUSEMAP_PORT1_RIGHT:
case AKS_MOUSEMAP_PORT0_LEFT:
((changed_prefs.jports[0].mousemap) ^= 1 << 0);
inputdevice_updateconfig(&changed_prefs, &currprefs);
break;
case AKS_MOUSEMAP_PORT0_RIGHT:
((changed_prefs.jports[0].mousemap) ^= 1 << 1);
inputdevice_updateconfig(&changed_prefs, &currprefs);
break;
case AKS_MOUSEMAP_PORT1_LEFT:
((changed_prefs.jports[1].mousemap) ^= 1 << 0);
inputdevice_updateconfig(&changed_prefs, &currprefs);
break;
case AKS_MOUSEMAP_PORT1_RIGHT:
((changed_prefs.jports[1].mousemap) ^= 1 << 1);
inputdevice_updateconfig (&changed_prefs, &currprefs);
break;
#endif
case AKS_MOUSE_SPEED_DOWN:
num_elements = sizeof(mousespeed_values) / sizeof( mousespeed_values[0] );
mousespeed = currprefs.input_joymouse_multiplier;
i = find_in_array(mousespeed_values, num_elements, mousespeed);
i = i - 1;
if (i < 0 ) { i = num_elements - 1 ;}
changed_prefs.input_joymouse_multiplier = mousespeed_values[i];
inputdevice_updateconfig (&changed_prefs, &currprefs);
break;
case AKS_MOUSE_SPEED_UP:
num_elements = sizeof(mousespeed_values) / sizeof( mousespeed_values[0] );
mousespeed = currprefs.input_joymouse_multiplier;
i = find_in_array(mousespeed_values, num_elements, mousespeed);
i = i + 1;
if (i >= num_elements ) { i =0 ;}
changed_prefs.input_joymouse_multiplier = mousespeed_values[i];
inputdevice_updateconfig (&changed_prefs, &currprefs);
break;
}
inputdevice_updateconfig(&changed_prefs, &currprefs);
break;
case AKS_MOUSE_SPEED_DOWN:
num_elements = sizeof(mousespeed_values) / sizeof(mousespeed_values[0]);
mousespeed = currprefs.input_joymouse_multiplier;
i = find_in_array(mousespeed_values, num_elements, mousespeed);
i = i - 1;
if (i < 0) { i = num_elements - 1; }
changed_prefs.input_joymouse_multiplier = mousespeed_values[i];
inputdevice_updateconfig(&changed_prefs, &currprefs);
break;
case AKS_MOUSE_SPEED_UP:
num_elements = sizeof(mousespeed_values) / sizeof(mousespeed_values[0]);
mousespeed = currprefs.input_joymouse_multiplier;
i = find_in_array(mousespeed_values, num_elements, mousespeed);
i = i + 1;
if (i >= num_elements) { i = 0; }
changed_prefs.input_joymouse_multiplier = mousespeed_values[i];
inputdevice_updateconfig(&changed_prefs, &currprefs);
break;
}
end:
return false;
}

View file

@ -336,12 +336,10 @@ DEFEVENT(SPC_INPUT_CONFIG2,_T("Select Input Configuration #2"),AM_K,0,0,AKS_INPU
DEFEVENT(SPC_INPUT_CONFIG3,_T("Select Input Configuration #3"),AM_K,0,0,AKS_INPUT_CONFIG_3)
DEFEVENT(SPC_INPUT_CONFIG4,_T("Select GamePorts Input Configuration"),AM_K,0,0,AKS_INPUT_CONFIG_4)
#ifndef PANDORA
DEFEVENT(SPC_MOUSEMAP_PORT0_LEFT,_T("Mouse Toggle P0 (First Axis)"),AM_K,0,0,AKS_MOUSEMAP_PORT0_LEFT)
DEFEVENT(SPC_MOUSEMAP_PORT0_RIGHT,_T("Mouse Toggle P0 (Second Axis)"),AM_K,0,0,AKS_MOUSEMAP_PORT0_RIGHT)
DEFEVENT(SPC_MOUSEMAP_PORT1_LEFT,_T("Mouse Toggle P1 (First Axis)"),AM_K,0,0,AKS_MOUSEMAP_PORT1_LEFT)
DEFEVENT(SPC_MOUSEMAP_PORT1_RIGHT,_T("Mouse Toggle P1 (Second Axis)"),AM_K,0,0,AKS_MOUSEMAP_PORT1_RIGHT)
#endif
DEFEVENT(SPC_MOUSE_SPEED_UP,_T("Mouse Speed Up"),AM_K,0,0,AKS_MOUSE_SPEED_UP)
DEFEVENT(SPC_MOUSE_SPEED_DOWN,_T("Mouse Speed Down"),AM_K,0,0,AKS_MOUSE_SPEED_DOWN)

View file

@ -235,9 +235,9 @@ void target_default_options(struct uae_prefs* p, int type)
p->gfx_size.width = 320;
p->gfx_size.height = 240;
p->gfx_resolution = RES_LORES;
p->pandora_cpu_speed = defaultCpuSpeed;
p->pandora_hide_idle_led = 0;
p->pandora_tapDelay = 10;
p->cpu_speed = defaultCpuSpeed;
p->hide_idle_led = 0;
p->tapDelay = 10;
#endif //PANDORA
#ifdef PANDORA
@ -940,7 +940,7 @@ void resetCpuSpeed(void)
if(cpuSpeedChanged)
{
lastCpuSpeed = defaultCpuSpeed - 10;
currprefs.pandora_cpu_speed = changed_prefs.pandora_cpu_speed = defaultCpuSpeed;
currprefs.cpu_speed = changed_prefs.cpu_speed = defaultCpuSpeed;
setCpuSpeed();
}
#endif

View file

@ -532,13 +532,11 @@ void gui_display(int shortcut)
void moveVertical(int value)
{
#ifdef PANDORA
changed_prefs.pandora_vertical_offset += value;
if(changed_prefs.pandora_vertical_offset < -16 + OFFSET_Y_ADJUST)
changed_prefs.pandora_vertical_offset = -16 + OFFSET_Y_ADJUST;
else if(changed_prefs.pandora_vertical_offset > 16 + OFFSET_Y_ADJUST)
changed_prefs.pandora_vertical_offset = 16 + OFFSET_Y_ADJUST;
#endif
changed_prefs.vertical_offset += value;
if(changed_prefs.vertical_offset < -16 + OFFSET_Y_ADJUST)
changed_prefs.vertical_offset = -16 + OFFSET_Y_ADJUST;
else if(changed_prefs.vertical_offset > 16 + OFFSET_Y_ADJUST)
changed_prefs.vertical_offset = 16 + OFFSET_Y_ADJUST;
}
void gui_led(int led, int on)

View file

@ -192,9 +192,7 @@ static void parse_clip(struct uae_prefs* p, xmlNode* node)
if (attr != nullptr)
{
top = atoi(reinterpret_cast<const char *>(attr)) / 2;
#ifdef PANDORA
p->pandora_vertical_offset = top - 41 + OFFSET_Y_ADJUST;
#endif //PANDORA
p->vertical_offset = top - 41 + OFFSET_Y_ADJUST;
xmlFree(attr);
}
attr = xmlGetProp(curr_node, reinterpret_cast<const xmlChar *>("width"));

View file

@ -287,14 +287,12 @@ static NavigationMap navMap[] =
#ifdef PANDORA
{ "StatusLine", "Miscellaneous", "Miscellaneous", "MasterWP", "HideIdle" },
{ "HideIdle", "Miscellaneous", "Miscellaneous", "StatusLine", "ShowGUI" },
{ "ShowGUI", "Miscellaneous", "Miscellaneous", "HideIdle", "PandSpeed" },
{ "PandSpeed", "", "", "ShowGUI", "BSDSocket" },
{ "BSDSocket", "Miscellaneous", "Miscellaneous", "PandSpeed", "MasterWP" },
{ "MasterWP", "Miscellaneous", "Miscellaneous", "BSDSocket", "StatusLine" },
{ "KeyForMenu", "Miscellaneous", "KeyForQuit", "MasterWP", "StatusLine" },
{ "KeyForQuit", "KeyForMenu", "Miscellaneous", "MasterWP", "StatusLine" },
{ "ShowGUI", "Miscellaneous", "Miscellaneous", "HideIdle", "PandSpeed" },
{ "PandSpeed", "", "", "ShowGUI", "BSDSocket" },
{ "BSDSocket", "Miscellaneous", "Miscellaneous", "PandSpeed", "MasterWP" },
{ "MasterWP", "Miscellaneous", "Miscellaneous", "BSDSocket", "StatusLine" },
{ "OpenGUI", "Miscellaneous", "KeyForQuit", "MasterWP", "StatusLine" },
{ "KeyForQuit", "OpenGUI", "Miscellaneous", "MasterWP", "StatusLine" },
#else
{ "StatusLine", "Miscellaneous", "RetroArchQuit", "scrolllock", "HideIdle" },

View file

@ -288,11 +288,11 @@ public:
else if (actionEvent.getSource() == cboTapDelay)
{
if (cboTapDelay->getSelected() == 0)
changed_prefs.pandora_tapDelay = 10;
changed_prefs.tapDelay = 10;
else if (cboTapDelay->getSelected() == 1)
changed_prefs.pandora_tapDelay = 5;
changed_prefs.tapDelay = 5;
else
changed_prefs.pandora_tapDelay = 2;
changed_prefs.tapDelay = 2;
}
#endif
else if (actionEvent.getSource() == chkMouseHack)
@ -685,9 +685,9 @@ void RefreshPanelInput()
}
}
#ifdef PANDORA
if (changed_prefs.pandora_tapDelay == 10)
if (changed_prefs.tapDelay == 10)
cboTapDelay->setSelected(0);
else if (changed_prefs.pandora_tapDelay == 5)
else if (changed_prefs.tapDelay == 5)
cboTapDelay->setSelected(1);
else
cboTapDelay->setSelected(2);

View file

@ -139,9 +139,9 @@ public:
{
int newspeed = (int)sldPandoraSpeed->getValue();
newspeed = newspeed - (newspeed % 20);
if (changed_prefs.pandora_cpu_speed != newspeed)
if (changed_prefs.cpu_speed != newspeed)
{
changed_prefs.pandora_cpu_speed = newspeed;
changed_prefs.cpu_speed = newspeed;
RefreshPanelMisc();
}
}
@ -338,7 +338,7 @@ void RefreshPanelMisc()
{
chkStatusLine->setSelected(changed_prefs.leds_on_screen);
#ifdef PANDORA
chkHideIdleLed->setSelected(changed_prefs.pandora_hide_idle_led);
chkHideIdleLed->setSelected(changed_prefs.hide_idle_led);
#endif
chkShowGUI->setSelected(changed_prefs.start_gui);
@ -347,8 +347,8 @@ void RefreshPanelMisc()
chkRetroArchReset->setSelected(changed_prefs.use_retroarch_reset);
//chkRetroArchSavestate->setSelected(changed_prefs.use_retroarch_statebuttons);
#ifdef PANDORA
sldPandoraSpeed->setValue(changed_prefs.pandora_cpu_speed);
snprintf(tmp, 20, "%d MHz", changed_prefs.pandora_cpu_speed);
sldPandoraSpeed->setValue(changed_prefs.cpu_speed);
snprintf(tmp, 20, "%d MHz", changed_prefs.cpu_speed);
lblPandoraSpeedInfo->setCaption(tmp);
#endif
chkBSDSocket->setSelected(changed_prefs.socket_emu);

View file

@ -120,12 +120,10 @@ void ExitPanelInput(void);
void RefreshPanelInput(void);
bool HelpPanelInput(std::vector<std::string> &helptext);
#ifndef PANDORA
void InitPanelCustom(const struct _ConfigCategory& category);
void ExitPanelCustom(void);
void RefreshPanelCustom(void);
bool HelpPanelCustom(std::vector<std::string> &helptext);
#endif
void InitPanelMisc(const struct _ConfigCategory& category);
void ExitPanelMisc(void);

View file

@ -67,7 +67,7 @@ void draw_status_line_single(uae_u8 *buf, int y, int totalwidth)
if(nr_units() < 1)
x += TD_WIDTH;
#ifdef PANDORA
if(currprefs.pandora_hide_idle_led)
if(currprefs.hide_idle_led)
x += TD_WIDTH;
#endif
if(picasso_on)
@ -76,7 +76,7 @@ void draw_status_line_single(uae_u8 *buf, int y, int totalwidth)
memset (buf + (x - 4) * gfxvidinfo.drawbuffer.pixbytes, 0, (gfxvidinfo.drawbuffer.outwidth - x + 4) * gfxvidinfo.drawbuffer.pixbytes);
#ifdef PANDORA
for (led = (currprefs.pandora_hide_idle_led == 0) ? -2 : -1; led < (currprefs.nr_floppies+1); led++) {
for (led = (currprefs.hide_idle_led == 0) ? -2 : -1; led < (currprefs.nr_floppies+1); led++) {
#else
for (led = -2; led < (currprefs.nr_floppies + 1); led++) {
#endif