Commit 57414482 authored by negativeExponent's avatar negativeExponent
Browse files

Cleanup settings.cpp

parent f065c412
......@@ -42,9 +42,9 @@ static void hookup_ports(bool force);
static bool initial_ports_hookup = false;
std::string retro_base_directory;
std::string retro_base_name;
std::string retro_save_directory;
static std::string retro_base_directory;
static std::string retro_base_name;
static std::string retro_save_directory;
static bool libretro_supports_input_bitmasks;
static int system_color_depth = 16;
......
......@@ -21,11 +21,6 @@
#include <string>
#include "settings.h"
bool MDFN_SaveSettings(const char *path)
{
return(1);
}
uint64 MDFN_GetSettingUI(const char *name)
{
......@@ -47,37 +42,18 @@ double MDFN_GetSettingF(const char *name)
bool MDFN_GetSettingB(const char *name)
{
if (!strcmp("cheats", name))
if (!strcmp("lynx.lowpass", name))
return 0;
/* FILESYS */
if (!strcmp("filesys.untrusted_fip_check", name))
if (!strcmp("lynx.rotateinput", name))
return 0;
if (!strcmp("cheats", 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)
{
/* 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;
}
......@@ -3,13 +3,6 @@
#include <string>
bool MDFN_LoadSettings(const char *path, const char *section = NULL, bool override = false);
bool MDFN_MergeSettings(const void*);
// bool MDFN_MergeSettings(const std::vector<void> &);
bool MDFN_SaveSettings(const char *path);
void MDFN_KillSettings(void); // Free any resources acquired.
// This should assert() or something if the setting isn't found, since it would
// be a totally tubular error!
uint64 MDFN_GetSettingUI(const char *name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment