Code is cross-platform again, thanks to #ifdef HW_RVL.

This commit is contained in:
Carl.Kenner 2009-05-09 11:40:54 +00:00
parent 6b875e9bd9
commit a428841e7a
2 changed files with 30 additions and 0 deletions

View File

@ -438,7 +438,11 @@ void DOSBOX_Init(void) {
Pbool = secprop->Add_bool("nosound",Property::Changeable::OnlyAtStart,false); Pbool = secprop->Add_bool("nosound",Property::Changeable::OnlyAtStart,false);
Pbool->Set_help("Enable silent mode, sound is still emulated though."); Pbool->Set_help("Enable silent mode, sound is still emulated though.");
#ifdef HW_RVL
Pint = secprop->Add_int("rate",Property::Changeable::OnlyAtStart,48000); Pint = secprop->Add_int("rate",Property::Changeable::OnlyAtStart,48000);
#else
Pint = secprop->Add_int("rate",Property::Changeable::OnlyAtStart,22050);
#endif
Pint->Set_values(rates); Pint->Set_values(rates);
Pint->Set_help("Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality."); Pint->Set_help("Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality.");
@ -509,7 +513,11 @@ void DOSBOX_Init(void) {
Pstring->Set_values(oplemus); Pstring->Set_values(oplemus);
Pstring->Set_help("Provider for the OPL emulation. compat or old might provide better quality (see oplrate as well)."); Pstring->Set_help("Provider for the OPL emulation. compat or old might provide better quality (see oplrate as well).");
#ifdef HW_RVL
Pint = secprop->Add_int("oplrate",Property::Changeable::WhenIdle,48000); Pint = secprop->Add_int("oplrate",Property::Changeable::WhenIdle,48000);
#else
Pint = secprop->Add_int("oplrate",Property::Changeable::WhenIdle,22050);
#endif
Pint->Set_values(oplrates); Pint->Set_values(oplrates);
Pint->Set_help("Sample rate of OPL music emulation. Use 49716 for highest quality (set the mixer rate accordingly)."); Pint->Set_help("Sample rate of OPL music emulation. Use 49716 for highest quality (set the mixer rate accordingly).");
@ -518,7 +526,11 @@ void DOSBOX_Init(void) {
Pbool = secprop->Add_bool("gus",Property::Changeable::WhenIdle,false); Pbool = secprop->Add_bool("gus",Property::Changeable::WhenIdle,false);
Pbool->Set_help("Enable the Gravis Ultrasound emulation."); Pbool->Set_help("Enable the Gravis Ultrasound emulation.");
#ifdef HW_RVL
Pint = secprop->Add_int("gusrate",Property::Changeable::WhenIdle,48000); Pint = secprop->Add_int("gusrate",Property::Changeable::WhenIdle,48000);
#else
Pint = secprop->Add_int("gusrate",Property::Changeable::WhenIdle,22050);
#endif
Pint->Set_values(rates); Pint->Set_values(rates);
Pint->Set_help("Sample rate of Ultrasound emulation."); Pint->Set_help("Sample rate of Ultrasound emulation.");
@ -545,7 +557,11 @@ void DOSBOX_Init(void) {
Pbool = secprop->Add_bool("pcspeaker",Property::Changeable::WhenIdle,true); Pbool = secprop->Add_bool("pcspeaker",Property::Changeable::WhenIdle,true);
Pbool->Set_help("Enable PC-Speaker emulation."); Pbool->Set_help("Enable PC-Speaker emulation.");
#ifdef HW_RVL
Pint = secprop->Add_int("pcrate",Property::Changeable::WhenIdle,48000); Pint = secprop->Add_int("pcrate",Property::Changeable::WhenIdle,48000);
#else
Pint = secprop->Add_int("pcrate",Property::Changeable::WhenIdle,22050);
#endif
Pint->Set_values(rates); Pint->Set_values(rates);
Pint->Set_help("Sample rate of the PC-Speaker sound generation."); Pint->Set_help("Sample rate of the PC-Speaker sound generation.");
@ -555,7 +571,11 @@ void DOSBOX_Init(void) {
Pstring->Set_values(tandys); Pstring->Set_values(tandys);
Pstring->Set_help("Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'."); Pstring->Set_help("Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'.");
#ifdef HW_RVL
Pint = secprop->Add_int("tandyrate",Property::Changeable::WhenIdle,48000); Pint = secprop->Add_int("tandyrate",Property::Changeable::WhenIdle,48000);
#else
Pint = secprop->Add_int("tandyrate",Property::Changeable::WhenIdle,22050);
#endif
Pint->Set_values(rates); Pint->Set_values(rates);
Pint->Set_help("Sample rate of the Tandy 3-Voice generation."); Pint->Set_help("Sample rate of the Tandy 3-Voice generation.");

View File

@ -1225,6 +1225,7 @@ void GFX_LosingFocus(void) {
} }
void GFX_Events() { void GFX_Events() {
#ifdef HWRVL
// check for home button // check for home button
u32 btns; u32 btns;
for(int i=0; i<4; i++) for(int i=0; i<4; i++)
@ -1233,6 +1234,7 @@ void GFX_Events() {
if((btns & WPAD_BUTTON_HOME) || (btns & WPAD_CLASSIC_BUTTON_HOME)) if((btns & WPAD_BUTTON_HOME) || (btns & WPAD_CLASSIC_BUTTON_HOME))
throw(0); throw(0);
} }
#endif
SDL_Event event; SDL_Event event;
#if defined (REDUCE_JOYSTICK_POLLING) #if defined (REDUCE_JOYSTICK_POLLING)
@ -1389,10 +1391,18 @@ void Config_Add_SDL() {
Prop_int* Pint; Prop_int* Pint;
Prop_multival* Pmulti; Prop_multival* Pmulti;
#ifdef HW_RVL
Pbool = sdl_sec->Add_bool("fullscreen",Property::Changeable::Always,true); Pbool = sdl_sec->Add_bool("fullscreen",Property::Changeable::Always,true);
#else
Pbool = sdl_sec->Add_bool("fullscreen",Property::Changeable::Always,false);
#endif
Pbool->Set_help("Start dosbox directly in fullscreen."); Pbool->Set_help("Start dosbox directly in fullscreen.");
#ifdef HW_RVL
Pbool = sdl_sec->Add_bool("fulldouble",Property::Changeable::Always,true); Pbool = sdl_sec->Add_bool("fulldouble",Property::Changeable::Always,true);
#else
Pbool = sdl_sec->Add_bool("fulldouble",Property::Changeable::Always,false);
#endif
Pbool->Set_help("Use double buffering in fullscreen."); Pbool->Set_help("Use double buffering in fullscreen.");
Pstring = sdl_sec->Add_string("fullresolution",Property::Changeable::Always,"original"); Pstring = sdl_sec->Add_string("fullresolution",Property::Changeable::Always,"original");