mirror of https://github.com/PCSX2/pcsx2.git
Common: Clang format PS2Ext.h
This commit is contained in:
parent
a37e62337d
commit
e883e93f52
|
@ -57,7 +57,8 @@ static void SysMessage(const wchar_t *fmt, ...);
|
|||
static void __forceinline PluginNullConfigure(std::wstring desc, s32& log);
|
||||
#endif
|
||||
|
||||
enum FileMode {
|
||||
enum FileMode
|
||||
{
|
||||
READ_FILE = 0,
|
||||
WRITE_FILE
|
||||
};
|
||||
|
@ -71,7 +72,8 @@ struct PluginLog
|
|||
{
|
||||
LogFile = px_fopen(logname, "w");
|
||||
|
||||
if (LogFile) {
|
||||
if (LogFile)
|
||||
{
|
||||
setvbuf(LogFile, NULL, _IONBF, 0);
|
||||
return true;
|
||||
}
|
||||
|
@ -80,7 +82,8 @@ struct PluginLog
|
|||
|
||||
void Close()
|
||||
{
|
||||
if (LogFile) {
|
||||
if (LogFile)
|
||||
{
|
||||
fclose(LogFile);
|
||||
LogFile = NULL;
|
||||
}
|
||||
|
@ -92,12 +95,14 @@ struct PluginLog
|
|||
return;
|
||||
|
||||
va_list list;
|
||||
if (WriteToFile) {
|
||||
if (WriteToFile)
|
||||
{
|
||||
va_start(list, fmt);
|
||||
vfprintf(LogFile, fmt, list);
|
||||
va_end(list);
|
||||
}
|
||||
if (WriteToConsole) {
|
||||
if (WriteToConsole)
|
||||
{
|
||||
va_start(list, fmt);
|
||||
vfprintf(stdout, fmt, list);
|
||||
va_end(list);
|
||||
|
@ -110,13 +115,15 @@ struct PluginLog
|
|||
return;
|
||||
|
||||
va_list list;
|
||||
if (WriteToFile) {
|
||||
if (WriteToFile)
|
||||
{
|
||||
va_start(list, fmt);
|
||||
vfprintf(LogFile, fmt, list);
|
||||
va_end(list);
|
||||
fprintf(LogFile, "\n");
|
||||
}
|
||||
if (WriteToConsole) {
|
||||
if (WriteToConsole)
|
||||
{
|
||||
va_start(list, fmt);
|
||||
vfprintf(stdout, fmt, list);
|
||||
va_end(list);
|
||||
|
@ -164,9 +171,12 @@ struct PluginConf
|
|||
|
||||
bool Open(std::string name, FileMode mode = READ_FILE)
|
||||
{
|
||||
if (mode == READ_FILE) {
|
||||
if (mode == READ_FILE)
|
||||
{
|
||||
ConfFile = px_fopen(name, "r");
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
ConfFile = px_fopen(name, "w");
|
||||
}
|
||||
|
||||
|
@ -178,7 +188,8 @@ struct PluginConf
|
|||
|
||||
void Close()
|
||||
{
|
||||
if (ConfFile) {
|
||||
if (ConfFile)
|
||||
{
|
||||
fclose(ConfFile);
|
||||
ConfFile = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue