void CSettings::RegisterSettings(void) { SetModuleName("default"); m_Set_EnableAudio = FindSystemSettingId("Enable Audio"); m_Set_FixedAudio = FindSystemSettingId("Fixed Audio"); m_Set_SyncAudio = FindSystemSettingId("Sync Audio"); m_Set_FullSpeed = FindSystemSettingId("Full Speed"); m_Set_LimitFPS = FindSystemSettingId("Limit FPS"); m_Set_basic_mode = FindSystemSettingId("Basic Mode"); m_Set_debugger = FindSystemSettingId("Debugger"); m_Set_log_flush = FindSystemSettingId("Log Auto Flush"); m_Set_log_dir = FindSystemSettingId("Dir:Log"); SetModuleName("Audio"); RegisterSetting(Set_Volume, Data_DWORD_General, "Volume", "Settings", 100, NULL); RegisterSetting(Set_Logging_MD5, Data_DWORD_General, "MD5", "Logging", g_ModuleLogLevel[TraceMD5], NULL); RegisterSetting(Set_Logging_Thread, Data_DWORD_General, "Thread", "Logging", g_ModuleLogLevel[TraceThread], NULL); RegisterSetting(Set_Logging_Path, Data_DWORD_General, "Path", "Logging", g_ModuleLogLevel[TracePath], NULL); RegisterSetting(Set_Logging_InitShutdown, Data_DWORD_General, "InitShutdown", "Logging", g_ModuleLogLevel[TraceAudioInitShutdown], NULL); RegisterSetting(Set_Logging_Interface, Data_DWORD_General, "Interface", "Logging", g_ModuleLogLevel[TraceAudioInterface], NULL); RegisterSetting(Set_Logging_Driver, Data_DWORD_General, "Driver", "Logging", g_ModuleLogLevel[TraceAudioDriver], NULL); RegisterSetting(Set_TinyBuffer, Data_DWORD_Game, "TinyBuffer", "", (bool)true, NULL); RegisterSetting(Set_FPSBuffer, Data_DWORD_Game, "FPSBuffer", "", (bool)true, NULL); LogLevelChanged(); }
void INIzerINIManager::Initialize() { _MESSAGE("INI Path: %s", GetINIPath()); std::fstream INIStream(GetINIPath(), std::fstream::in); if (INIStream.fail()) { CreateINI = true; _MESSAGE("INI File not found; Creating one..."); } INIStream.close(); INIStream.clear(); RegisterSetting(new INISetting(this, "INI", "Filenames", "Oblivion.ini")); RegisterSetting(new INISetting(this, "Plugin List", "Filenames", "Plugins.txt")); }
GameSettings::GameSettings() { GameWindowTitle = "Down_Across"; RegisterSetting((void*)&GameWindowHeight, "Game_Window_Height"); RegisterSetting((void*)&GameWindowWidth, "Game_Window_Width"); RegisterSetting((void*)&GameWindowTitle, "Game_Window_Title"); RegisterSetting((void*)&TileHeight, "Tile_Height"); RegisterSetting((void*)&TileWidth, "Tile_Width"); RegisterSetting((void*)&GridRowsCount, "Grid_Row_Count"); RegisterSetting((void*)&GridColumnsCount, "Grid_Column_Count"); }
void SetupAudioSettings (void) { SetModuleName("AndroidAudio"); RegisterSetting(Output_SwapChannels, Data_DWORD_General, "SwapChannels", "", 0, NULL); RegisterSetting(Output_DefaultFrequency, Data_DWORD_General, "DefaultFrequency", "", DEFAULT_FREQUENCY, NULL); RegisterSetting(Buffer_PrimarySize, Data_DWORD_General, "BufferPrimarySize", "", PRIMARY_BUFFER_SIZE, NULL); RegisterSetting(Buffer_SecondarySize, Data_DWORD_General, "BufferSecondarySize", "", SECONDARY_BUFFER_SIZE, NULL); RegisterSetting(Buffer_SecondaryNbr, Data_DWORD_General, "BufferSecondaryNbr", "", SECONDARY_BUFFER_NBR, NULL); RegisterSetting(Logging_LogAudioInitShutdown, Data_DWORD_General, "AudioInitShutdown", "Logging", g_ModuleLogLevel[TraceAudioInitShutdown], NULL); RegisterSetting(Logging_LogAudioInterface, Data_DWORD_General, "AudioInterface", "Logging", g_ModuleLogLevel[TraceAudioInterface], NULL); g_SwapChannels = GetSetting(Output_SwapChannels); g_GameFreq = GetSetting(Output_DefaultFrequency); g_ModuleLogLevel[TraceAudioInitShutdown] = GetSetting(Logging_LogAudioInitShutdown); g_ModuleLogLevel[TraceAudioInterface] = GetSetting(Logging_LogAudioInterface); }
bool Tex2RTFConnection::OnExecute(const wxString& WXUNUSED(topic), wxChar *data, int WXUNUSED(size), wxIPCFormat WXUNUSED(format)) { wxStrcpy(Tex2RTFLastStatus, _T("OK")); wxChar firstArg[50]; wxChar secondArg[300]; if (SplitCommand(data, firstArg, secondArg)) { bool hasArg = (wxStrlen(secondArg) > 0); if (wxStrcmp(firstArg, _T("INPUT")) == 0 && hasArg) { InputFile = secondArg; if (frame) { wxChar buf[100]; wxString str = wxFileNameFromPath(InputFile); wxSnprintf(buf, sizeof(buf), _T("Tex2RTF [%s]"), (const wxChar*) str); frame->SetTitle(buf); } } else if (wxStrcmp(firstArg, _T("OUTPUT")) == 0 && hasArg) { OutputFile = secondArg; } else if (wxStrcmp(firstArg, _T("GO")) == 0) { wxStrcpy(Tex2RTFLastStatus, _T("WORKING")); if (!Go()) wxStrcpy(Tex2RTFLastStatus, _T("CONVERSION ERROR")); else wxStrcpy(Tex2RTFLastStatus, _T("OK")); } else if (wxStrcmp(firstArg, _T("EXIT")) == 0) { if (frame) frame->Close(); } else if (wxStrcmp(firstArg, _T("MINIMIZE")) == 0 || wxStrcmp(firstArg, _T("ICONIZE")) == 0) { if (frame) frame->Iconize(true); } else if (wxStrcmp(firstArg, _T("SHOW")) == 0 || wxStrcmp(firstArg, _T("RESTORE")) == 0) { if (frame) { frame->Iconize(false); frame->Show(true); } } else { // Try for a setting wxStrcpy(Tex2RTFLastStatus, RegisterSetting(firstArg, secondArg, false)); #if !defined(NO_GUI) && wxUSE_STATUSBAR if (frame && wxStrcmp(firstArg, _T("conversionMode")) == 0) { wxChar buf[100]; wxStrcpy(buf, _T("In ")); if (winHelp && (convertMode == TEX_RTF)) wxStrcat(buf, _T("WinHelp RTF")); else if (!winHelp && (convertMode == TEX_RTF)) wxStrcat(buf, _T("linear RTF")); else if (convertMode == TEX_HTML) wxStrcat(buf, _T("HTML")); else if (convertMode == TEX_XLP) wxStrcat(buf, _T("XLP")); wxStrcat(buf, _T(" mode.")); frame->SetStatusText(buf, 1); } #endif } } return true; }