mirror of
https://github.com/libretro/beetle-gba-libretro.git
synced 2024-11-23 08:19:57 +00:00
101 lines
2.9 KiB
C++
101 lines
2.9 KiB
C++
/* Mednafen - Multi-system Emulator
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#include "mednafen.h"
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
#include <string>
|
|
#include "settings.h"
|
|
|
|
uint32_t setting_gba_hle = 1;
|
|
|
|
uint64 MDFN_GetSettingUI(const char *name)
|
|
{
|
|
|
|
fprintf(stderr, "unhandled setting UI: %s\n", name);
|
|
return 0;
|
|
}
|
|
|
|
int64 MDFN_GetSettingI(const char *name)
|
|
{
|
|
fprintf(stderr, "unhandled setting I: %s\n", name);
|
|
return 0;
|
|
}
|
|
|
|
double MDFN_GetSettingF(const char *name)
|
|
{
|
|
#if defined(WANT_SNES_EMU)
|
|
if (!strcmp("snes.mouse_sensitivity", name))
|
|
return 0.50;
|
|
#endif
|
|
fprintf(stderr, "unhandled setting F: %s\n", name);
|
|
return 0;
|
|
}
|
|
|
|
bool MDFN_GetSettingB(const char *name)
|
|
{
|
|
if (!strcmp("cheats", name))
|
|
return 0;
|
|
/* LIBRETRO */
|
|
if (!strcmp("libretro.cd_load_into_ram", name))
|
|
return 0;
|
|
#if defined(WANT_SNES_EMU)
|
|
if (!strcmp("snes.correct_aspect", name))
|
|
return 0;
|
|
if (!strcmp("snes.input.port1.multitap", name))
|
|
return 0;
|
|
if (!strcmp("snes.input.port2.multitap", name))
|
|
return 0;
|
|
#endif
|
|
/* CDROM */
|
|
if (!strcmp("cdrom.lec_eval", name))
|
|
return 1;
|
|
/* FILESYS */
|
|
if (!strcmp("filesys.untrusted_fip_check", name))
|
|
return 0;
|
|
if (!strcmp("filesys.disablesavegz", name))
|
|
return 1;
|
|
fprintf(stderr, "unhandled setting B: %s\n", name);
|
|
return 0;
|
|
}
|
|
|
|
extern std::string retro_base_directory;
|
|
extern std::string retro_base_name;
|
|
|
|
std::string MDFN_GetSettingS(const char *name)
|
|
{
|
|
if (!strcmp("gba.bios", name))
|
|
return setting_gba_hle ? std::string("") : std::string("gba_bios.bin");
|
|
/* FILESYS */
|
|
if (!strcmp("filesys.path_firmware", name))
|
|
return retro_base_directory;
|
|
if (!strcmp("filesys.path_palette", name))
|
|
return retro_base_directory;
|
|
if (!strcmp("filesys.path_sav", name))
|
|
return retro_base_directory;
|
|
if (!strcmp("filesys.path_state", name))
|
|
return retro_base_directory;
|
|
if (!strcmp("filesys.path_cheat", name))
|
|
return retro_base_directory;
|
|
if (!strcmp("filesys.fname_state", name))
|
|
return retro_base_name + std::string(".sav");
|
|
if (!strcmp("filesys.fname_sav", name))
|
|
return retro_base_name + std::string(".bsv");
|
|
fprintf(stderr, "unhandled setting S: %s\n", name);
|
|
return 0;
|
|
}
|