Refresh a little bit the switchs

This commit is contained in:
Chips 2016-04-03 10:15:26 +00:00
parent cad16d836e
commit cea376d5a0
8 changed files with 37 additions and 114 deletions

View file

@ -1,40 +0,0 @@
#!/bin/bash
cd ./src
# Link to our config.h
if ! [ -e "config.h" ]; then
ln -s od-pandora/config.h config.h
fi
# Link to our sysconfig.h
if ! [ -e "sysconfig.h" ]; then
ln -s od-pandora/sysconfig.h sysconfig.h
fi
# Link to our target.h
if ! [ -e "target.h" ]; then
ln -s od-pandora/target.h target.h
fi
# Link od-pandora to osdep
if ! [ -d "osdep" ]; then
ln -s od-pandora osdep
fi
# We use SDL-threads, so link td-sdl to threaddep
if ! [ -d "threaddep" ]; then
ln -s td-sdl threaddep
fi
# Link md-pandora to machdep
if ! [ -d "machdep" ]; then
ln -s md-pandora machdep
fi
# Link od-sound to sounddep
if ! [ -d "sounddep" ]; then
ln -s sd-pandora sounddep
fi
cd ..

View file

@ -1672,15 +1672,11 @@ void default_prefs (struct uae_prefs *p, int type)
strcpy (p->df[2], "");
strcpy (p->df[3], "");
#ifdef RASPBERRY
// Choose automatically first rom.
if (lstAvailableROMs.size() >= 1)
strncpy(currprefs.romfile,lstAvailableROMs[0]->Path,255);
else
strcpy (p->romfile, "kick.rom");
#else
strcpy (p->romfile, "kick.rom");
#endif
strcpy (p->romextfile, "");
sprintf (p->path_rom, "%s/kickstarts/", start_path_data);

View file

@ -1841,16 +1841,9 @@ static void draw_status_line (int line)
#ifdef PICASSO96
if(picasso_on)
{
#ifdef RASPBERRY
// It should be thoses lines for everyones...
x = picasso_vidinfo.width - TD_PADX - 6 * TD_WIDTH;
y = line - (picasso_vidinfo.height - TD_TOTAL_HEIGHT);
xlinebuffer = (uae_u8*)prSDLScreen->pixels + picasso_vidinfo.rowbytes * line;
#else
x = prSDLScreen->w - TD_PADX - 6 * TD_WIDTH;
y = line - (prSDLScreen->h - TD_TOTAL_HEIGHT);
xlinebuffer = (uae_u8*)prSDLScreen->pixels + prSDLScreen->pitch * line;
#endif
}
else
#endif
@ -1864,11 +1857,7 @@ static void draw_status_line (int line)
x+=100 - (TD_WIDTH*(currprefs.nr_floppies-1)) - TD_WIDTH;
#ifdef PICASSO96
if(picasso_on)
#ifdef RASPBERRY
memset (buf + (x - 4) * 2, 0, (picasso_vidinfo.width - x + 4) * 2);
#else
memset (buf + (x - 4) * 2, 0, (prSDLScreen->w - x + 4) * 2);
#endif
else
#endif
memset (buf + (x - 4) * gfxvidinfo.pixbytes, 0, (gfxvidinfo.width - x + 4) * gfxvidinfo.pixbytes);
@ -2060,11 +2049,7 @@ void vsync_handle_redraw (int long_frame, int lof_changed)
int i;
gfx_lock_picasso();
for (i = 0; i < TD_TOTAL_HEIGHT; i++) {
#ifdef RASPBERRY
int line = picasso_vidinfo.height - TD_TOTAL_HEIGHT + i;
#else
int line = prSDLScreen->h - TD_TOTAL_HEIGHT + i;
#endif
draw_status_line (line);
}
gfx_unlock_picasso();

View file

@ -197,7 +197,7 @@ void do_mouse_hack (void)
//------------------------------------------
// New stylus<->follow mouse mode
//------------------------------------------
#ifndef RASPBERRY
#ifdef PANDORA_SPECIFIC
printf("do_mouse_hack: sprvbfl=%d\n", sprvbfl);
#endif
if (sprvbfl && (sprvbfl-- > 1))

View file

@ -24,7 +24,8 @@ static gcn::UaeCheckBox* chkStatusLine;
static gcn::UaeCheckBox* chkShowGUI;
#ifdef RASPBERRY
static gcn::UaeCheckBox* chkAspect;
#else
#endif
#ifdef PANDORA_SPECIFIC
static gcn::Label* lblPandoraSpeed;
static gcn::Label* lblPandoraSpeedInfo;
static gcn::Slider* sldPandoraSpeed;
@ -44,7 +45,8 @@ class MiscActionListener : public gcn::ActionListener
#ifdef RASPBERRY
else if (actionEvent.getSource() == chkAspect)
changed_prefs.gfx_correct_aspect = chkAspect->isSelected();
#else
#endif
#ifdef PANDORA_SPECIFIC
else if (actionEvent.getSource() == sldPandoraSpeed)
{
int newspeed = (int) sldPandoraSpeed->getValue();
@ -75,7 +77,8 @@ void InitPanelMisc(const struct _ConfigCategory& category)
#ifdef RASPBERRY
chkAspect = new gcn::UaeCheckBox("4/3 ratio shrink");
chkAspect->addActionListener(miscActionListener);
#else
#endif
#ifdef PANDORA_SPECIFIC
lblPandoraSpeed = new gcn::Label("Pandora Speed:");
lblPandoraSpeed->setSize(110, LABEL_HEIGHT);
lblPandoraSpeed->setAlignment(gcn::Graphics::RIGHT);
@ -96,7 +99,8 @@ void InitPanelMisc(const struct _ConfigCategory& category)
#ifdef RASPBERRY
category.panel->add(chkAspect, DISTANCE_BORDER, posY);
posY += chkAspect->getHeight() + DISTANCE_NEXT_Y;
#else
#endif
#ifdef PANDORA_SPECIFIC
category.panel->add(lblPandoraSpeed, DISTANCE_BORDER, posY);
category.panel->add(sldPandoraSpeed, DISTANCE_BORDER + lblPandoraSpeed->getWidth() + 8, posY);
category.panel->add(lblPandoraSpeedInfo, sldPandoraSpeed->getX() + sldPandoraSpeed->getWidth() + 12, posY);
@ -112,7 +116,8 @@ void ExitPanelMisc(void)
delete chkShowGUI;
#ifdef RASPBERRY
delete chkAspect;
#else
#endif
#ifdef PANDORA_SPECIFIC
delete lblPandoraSpeed;
delete sldPandoraSpeed;
delete lblPandoraSpeedInfo;
@ -129,7 +134,8 @@ void RefreshPanelMisc(void)
chkShowGUI->setSelected(changed_prefs.start_gui);
#ifdef RASPBERRY
chkAspect->setSelected(changed_prefs.gfx_correct_aspect);
#else
#endif
#ifdef PANDORA_SPECIFIC
sldPandoraSpeed->setValue(changed_prefs.pandora_cpu_speed);
snprintf(tmp, 20, "%d MHz", changed_prefs.pandora_cpu_speed);
lblPandoraSpeedInfo->setCaption(tmp);

View file

@ -66,15 +66,10 @@ void inputmode_redraw(void)
SDL_Rect r;
SDL_Surface* surface;
#ifdef RASPBERRY
r.x=(prSDLScreen->w-160)/2;
r.y=(prSDLScreen->h-160)/2;
#else
r.x=80;
r.y=prSDLScreen->h-200;
r.w=160;
r.h=160;
#endif
if (inputMode[0] && inputMode[1] && inputMode[2])
{

View file

@ -580,7 +580,7 @@ void setCpuSpeed()
{
char speedCmd[128];
#ifdef RASPBERRY
#ifndef PANDORA_SPECIFIC
return;
#endif
@ -605,7 +605,7 @@ void setCpuSpeed()
void resetCpuSpeed(void)
{
#ifdef RASPBERRY
#ifndef PANDORA_SPECIFIC
return;
#endif
if(cpuSpeedChanged)
@ -915,7 +915,7 @@ void handle_events (void)
else
{
int mouseScale = currprefs.input_joymouse_multiplier / 2;
#ifndef RASPBERRY
#ifdef PANDORA_SPECIFIC
if(rEvent.motion.xrel > 20 || rEvent.motion.xrel < -20 || rEvent.motion.yrel > 20 || rEvent.motion.yrel < -20)
break;
#endif

View file

@ -1,19 +0,0 @@
#!/bin/bash
cd ./src
unlink config.h
unlink sysconfig.h
unlink target.h
unlink osdep
unlink threaddep
unlink machdep
unlink sounddep
cd ..