mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-12 01:00:44 +01:00
USBnull reformat
This commit is contained in:
1 parent
18941f1b80
commit
b246d13bae
5 files changed
+298
-283
No files matched your search
+31
-35
@@ -25,55 +25,51 @@ PluginConf Ini;
|
||||
|
||||
void setLoggingState()
|
||||
{
|
||||
if (conf.Log)
|
||||
{
|
||||
USBLog.WriteToConsole = true;
|
||||
USBLog.WriteToFile = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
USBLog.WriteToConsole = false;
|
||||
USBLog.WriteToFile = false;
|
||||
}
|
||||
if (conf.Log) {
|
||||
USBLog.WriteToConsole = true;
|
||||
USBLog.WriteToFile = true;
|
||||
} else {
|
||||
USBLog.WriteToConsole = false;
|
||||
USBLog.WriteToFile = false;
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT_C_(void) USBabout()
|
||||
EXPORT_C_(void)
|
||||
USBabout()
|
||||
{
|
||||
SysMessage("USBnull: A simple null plugin.");
|
||||
SysMessage("USBnull: A simple null plugin.");
|
||||
}
|
||||
|
||||
EXPORT_C_(void) USBconfigure()
|
||||
EXPORT_C_(void)
|
||||
USBconfigure()
|
||||
{
|
||||
LoadConfig();
|
||||
PluginNullConfigure("Since this is a null plugin, all that is really configurable is logging.", conf.Log);
|
||||
SaveConfig();
|
||||
LoadConfig();
|
||||
PluginNullConfigure("Since this is a null plugin, all that is really configurable is logging.", conf.Log);
|
||||
SaveConfig();
|
||||
}
|
||||
|
||||
void LoadConfig()
|
||||
{
|
||||
string IniPath = s_strIniPath + "/USBnull.ini";
|
||||
if (!Ini.Open(IniPath, READ_FILE))
|
||||
{
|
||||
USBLog.WriteLn("Failed to open %s", IniPath.c_str());
|
||||
SaveConfig();
|
||||
return;
|
||||
}
|
||||
string IniPath = s_strIniPath + "/USBnull.ini";
|
||||
if (!Ini.Open(IniPath, READ_FILE)) {
|
||||
USBLog.WriteLn("Failed to open %s", IniPath.c_str());
|
||||
SaveConfig();
|
||||
return;
|
||||
}
|
||||
|
||||
conf.Log = Ini.ReadInt("logging", 0);
|
||||
setLoggingState();
|
||||
Ini.Close();
|
||||
conf.Log = Ini.ReadInt("logging", 0);
|
||||
setLoggingState();
|
||||
Ini.Close();
|
||||
}
|
||||
|
||||
void SaveConfig()
|
||||
{
|
||||
string IniPath = s_strIniPath + "/USBnull.ini";
|
||||
if (!Ini.Open(IniPath, WRITE_FILE))
|
||||
{
|
||||
USBLog.WriteLn("Failed to open %s", IniPath.c_str());
|
||||
return;
|
||||
}
|
||||
string IniPath = s_strIniPath + "/USBnull.ini";
|
||||
if (!Ini.Open(IniPath, WRITE_FILE)) {
|
||||
USBLog.WriteLn("Failed to open %s", IniPath.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Ini.WriteInt("logging", conf.Log);
|
||||
Ini.Close();
|
||||
Ini.WriteInt("logging", conf.Log);
|
||||
Ini.Close();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user