2016-01-27 09:11:59 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2021-03-11 08:02:21 +00:00
|
|
|
// Get plugin settings, take a setting ID
|
2016-03-03 10:07:16 +00:00
|
|
|
unsigned int GetSetting(short SettingID);
|
|
|
|
const char * GetSettingSz(short SettingID, char * Buffer, int BufferLen);
|
|
|
|
|
2021-03-11 08:02:21 +00:00
|
|
|
// Get system settings, take a setting returned by FindSystemSettingId
|
2016-03-03 10:07:16 +00:00
|
|
|
unsigned int GetSystemSetting(short SettingID);
|
|
|
|
const char * GetSystemSettingSz(short SettingID, char * Buffer, int BufferLen);
|
|
|
|
|
|
|
|
// Set a settings value
|
|
|
|
void SetSetting(short SettingID, unsigned int Value);
|
|
|
|
void SetSettingSz(short SettingID, const char * Value);
|
2017-09-25 12:00:04 +00:00
|
|
|
|
|
|
|
void SetSystemSetting(short SettingID, unsigned int Value);
|
|
|
|
void SetSystemSettingSz(short SettingID, const char * Value);
|
2016-03-03 10:07:16 +00:00
|
|
|
|
2021-03-11 08:02:21 +00:00
|
|
|
// Enums
|
2016-03-03 10:07:16 +00:00
|
|
|
enum SETTING_DATA_TYPE
|
|
|
|
{
|
2021-03-11 08:02:21 +00:00
|
|
|
Data_DWORD_General = 0, // An unsigned int setting used anywhere
|
2016-03-03 10:07:16 +00:00
|
|
|
Data_String_General = 1, // A string setting used anywhere
|
2021-03-11 08:02:21 +00:00
|
|
|
Data_DWORD_Game = 2, // An unsigned int associated with the current game
|
2016-03-03 10:07:16 +00:00
|
|
|
Data_String_Game = 3, // A string associated with the current game
|
2021-03-11 08:02:21 +00:00
|
|
|
Data_DWORD_RDB = 4, // An unsigned int associated with the current game in the ROM database
|
|
|
|
Data_String_RDB = 5, // A string associated with the current game in the ROM database
|
|
|
|
Data_DWORD_RDB_Setting = 6, // An unsigned int read from the ROM database, with config file
|
|
|
|
Data_String_RDB_Setting = 7, // A string read from the ROM database, with config file
|
2016-03-03 10:07:16 +00:00
|
|
|
};
|
|
|
|
|
2021-03-11 08:02:21 +00:00
|
|
|
// Set other information about various settings
|
2016-03-03 10:07:16 +00:00
|
|
|
int SettingsInitilized(void);
|
|
|
|
void SetModuleName(const char * Name);
|
|
|
|
void RegisterSetting(short SettingID, SETTING_DATA_TYPE Type, const char * Name, const char * Category,
|
|
|
|
unsigned int DefaultDW, const char * DefaultStr);
|
|
|
|
void RegisterSetting2(short SettingID, SETTING_DATA_TYPE Type, const char * Name, const char * Category, short DefaultSettingID);
|
|
|
|
short FindSystemSettingId(const char * Name);
|
|
|
|
void FlushSettings(void);
|
|
|
|
|
2021-03-11 08:02:21 +00:00
|
|
|
// This must be implemented to be notified when a setting is used but has not been set up
|
2016-03-03 10:07:16 +00:00
|
|
|
void UseUnregisteredSetting(int SettingID);
|
2016-01-27 09:11:59 +00:00
|
|
|
|
2016-08-07 08:27:14 +00:00
|
|
|
typedef void(*SettingChangedFunc)(void *);
|
|
|
|
void SettingsRegisterChange(bool SystemSetting, int Type, void * Data, SettingChangedFunc Func);
|
|
|
|
void SettingsUnregisterChange(bool SystemSetting, int Type, void * Data, SettingChangedFunc Func);
|
|
|
|
|
2016-01-27 09:11:59 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2017-04-18 11:32:43 +00:00
|
|
|
|
|
|
|
class CNotification
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static void DisplayError(const char * Message);
|
|
|
|
static void FatalError(const char * Message);
|
|
|
|
static void DisplayMessage(int DisplayTime, const char * Message);
|
|
|
|
static void DisplayMessage2(const char * Message);
|
|
|
|
static void BreakPoint(const char * FileName, int LineNumber);
|
|
|
|
};
|
|
|
|
|
|
|
|
extern CNotification * g_Notify;
|