mirror of https://github.com/PCSX2/pcsx2.git
Missed some SPU2-X and all zzogl code in the last commit.
Fixed assumption that all paths received from pcsx2 end in the path separator. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4484 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e26693f5d4
commit
7d75a5a53b
|
@ -28,8 +28,8 @@ const u8 build = 7; // increase that with each version
|
|||
|
||||
static char *libraryName = "FWnull Driver";
|
||||
|
||||
string s_strIniPath="inis/";
|
||||
string s_strLogPath = "logs/";
|
||||
string s_strIniPath="inis";
|
||||
string s_strLogPath = "logs";
|
||||
|
||||
u8 phyregs[16];
|
||||
s8 *fwregs;
|
||||
|
@ -48,7 +48,7 @@ void LogInit()
|
|||
EXPORT_C_(void) FWsetLogDir(const char* dir)
|
||||
{
|
||||
// Get the path to the log directory.
|
||||
s_strLogPath = (dir==NULL) ? "logs/" : dir;
|
||||
s_strLogPath = (dir==NULL) ? "logs" : dir;
|
||||
|
||||
// Reload the log file after updated the path
|
||||
FWLog.Close();
|
||||
|
@ -269,7 +269,7 @@ EXPORT_C_(void) FWirqCallback(void (*callback)())
|
|||
EXPORT_C_(void) FWsetSettingsDir(const char* dir)
|
||||
{
|
||||
// Find out from pcsx2 where we are supposed to put our ini file.
|
||||
s_strIniPath = (dir == NULL) ? "inis/" : dir;
|
||||
s_strIniPath = (dir == NULL) ? "inis" : dir;
|
||||
}
|
||||
|
||||
EXPORT_C_(s32) FWfreeze(int mode, freezeData *data)
|
||||
|
|
|
@ -39,7 +39,7 @@ u32 GSKeyEvent = 0;
|
|||
bool GSShift = false, GSAlt = false;
|
||||
|
||||
string s_strIniPath="inis";
|
||||
std::string s_strLogPath("logs/");
|
||||
std::string s_strLogPath("logs");
|
||||
const char* s_iniFilename = "GSnull.ini";
|
||||
GSVars gs;
|
||||
|
||||
|
@ -72,7 +72,7 @@ EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
|||
bool OpenLog() {
|
||||
bool result = true;
|
||||
#ifdef GS_LOG
|
||||
const std::string LogFile(s_strLogPath + "GSnull.log");
|
||||
const std::string LogFile(s_strLogPath + "/GSnull.log");
|
||||
|
||||
gsLog = fopen(LogFile.c_str(), "w");
|
||||
if (gsLog != NULL)
|
||||
|
@ -127,13 +127,13 @@ void SysPrintf(const char *fmt, ...)
|
|||
// basic funcs
|
||||
EXPORT_C_(void) GSsetSettingsDir(const char* dir)
|
||||
{
|
||||
s_strIniPath = (dir == NULL) ? "inis/" : dir;
|
||||
s_strIniPath = (dir == NULL) ? "inis" : dir;
|
||||
}
|
||||
|
||||
EXPORT_C_(void) GSsetLogDir(const char* dir)
|
||||
{
|
||||
// Get the path to the log directory.
|
||||
s_strLogPath = (dir==NULL) ? "logs/" : dir;
|
||||
s_strLogPath = (dir==NULL) ? "logs" : dir;
|
||||
|
||||
// Reload the log file after updated the path
|
||||
if (gsLog) {
|
||||
|
|
|
@ -272,16 +272,15 @@ wchar_t *GetCommandStringW(u8 command, int port, int slot) {
|
|||
return L"";
|
||||
}
|
||||
|
||||
static wchar_t iniFile[MAX_PATH*2] = L"inis\\LilyPad.ini";
|
||||
static wchar_t iniFile[MAX_PATH*2] = L"inis/LilyPad.ini";
|
||||
|
||||
void CALLBACK PADsetSettingsDir( const char *dir )
|
||||
{
|
||||
// emulator assures a trailing slash/backslash (yay!)
|
||||
//swprintf_s( iniFile, L"%S", (dir==NULL) ? "inis\\" : dir );
|
||||
//swprintf_s( iniFile, L"%S", (dir==NULL) ? "inis" : dir );
|
||||
|
||||
//uint targlen = MultiByteToWideChar(CP_ACP, 0, dir, -1, NULL, 0);
|
||||
MultiByteToWideChar(CP_ACP, 0, dir, -1, iniFile, MAX_PATH*2);
|
||||
wcscat_s(iniFile, L"LilyPad.ini");
|
||||
wcscat_s(iniFile, L"/LilyPad.ini");
|
||||
|
||||
createIniDir = false;
|
||||
}
|
||||
|
|
|
@ -26,8 +26,8 @@ const u8 revision = 0;
|
|||
const u8 build = 1; // increase that with each version
|
||||
|
||||
static char *libraryName = "Padnull Driver";
|
||||
string s_strIniPath="inis/";
|
||||
string s_strLogPath="logs/";
|
||||
string s_strIniPath="inis";
|
||||
string s_strLogPath="logs";
|
||||
|
||||
FILE *padLog;
|
||||
Config conf;
|
||||
|
@ -74,7 +74,7 @@ void __LogToConsole(const char *fmt, ...)
|
|||
|
||||
EXPORT_C_(void) PADsetSettingsDir(const char* dir)
|
||||
{
|
||||
s_strIniPath = (dir == NULL) ? "inis/" : dir;
|
||||
s_strIniPath = (dir == NULL) ? "inis" : dir;
|
||||
}
|
||||
|
||||
bool OpenLog() {
|
||||
|
@ -99,7 +99,7 @@ bool OpenLog() {
|
|||
EXPORT_C_(void) PADsetLogDir(const char* dir)
|
||||
{
|
||||
// Get the path to the log directory.
|
||||
s_strLogPath = (dir==NULL) ? "logs/" : dir;
|
||||
s_strLogPath = (dir==NULL) ? "logs" : dir;
|
||||
|
||||
// Reload the log file after updated the path
|
||||
if (padLog) {
|
||||
|
|
|
@ -22,7 +22,7 @@ static const unsigned char buildfix = 1;
|
|||
HMODULE hInstance;
|
||||
HWND hTargetWnd;
|
||||
|
||||
static std::string s_strIniPath( "inis/" );
|
||||
static std::string s_strIniPath( "inis" );
|
||||
|
||||
static CRITICAL_SECTION update_lock;
|
||||
static CRITICAL_SECTION init_lock;
|
||||
|
@ -350,7 +350,7 @@ static std::string MakeConfigFileName()
|
|||
//GetModuleFileName (hInstance, fname, 256);
|
||||
//strcpy (fname + strlen (fname) - 3, "cfg");
|
||||
|
||||
return s_strIniPath + "PadSSSPSX.cfg";
|
||||
return s_strIniPath + "/PadSSSPSX.cfg";
|
||||
}
|
||||
|
||||
static void SaveConfig (void)
|
||||
|
@ -1140,7 +1140,7 @@ s32 CALLBACK PADtest (void)
|
|||
|
||||
void CALLBACK PADsetSettingsDir(const char* dir)
|
||||
{
|
||||
s_strIniPath = (dir==NULL) ? "inis/" : dir;
|
||||
s_strIniPath = (dir==NULL) ? "inis" : dir;
|
||||
}
|
||||
|
||||
// Returns 0 on success, -1 on error.
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
using namespace std;
|
||||
|
||||
#include "USB.h"
|
||||
string s_strIniPath="inis/";
|
||||
string s_strLogPath="logs/";
|
||||
string s_strIniPath="inis";
|
||||
string s_strLogPath="logs";
|
||||
|
||||
const unsigned char version = PS2E_USB_VERSION;
|
||||
const unsigned char revision = 0;
|
||||
|
@ -43,7 +43,7 @@ void LogInit()
|
|||
EXPORT_C_(void) USBsetLogDir(const char* dir)
|
||||
{
|
||||
// Get the path to the log directory.
|
||||
s_strLogPath = (dir==NULL) ? "logs/" : dir;
|
||||
s_strLogPath = (dir==NULL) ? "logs" : dir;
|
||||
|
||||
// Reload the log file after updated the path
|
||||
USBLog.Close();
|
||||
|
@ -239,7 +239,7 @@ EXPORT_C_(void) USBsetRAM(void *mem)
|
|||
EXPORT_C_(void) USBsetSettingsDir(const char* dir)
|
||||
{
|
||||
// Get the path to the ini directory.
|
||||
s_strIniPath = (dir==NULL) ? "inis/" : dir;
|
||||
s_strIniPath = (dir==NULL) ? "inis" : dir;
|
||||
}
|
||||
|
||||
// extended funcs
|
||||
|
|
|
@ -29,16 +29,15 @@
|
|||
char source_drive;
|
||||
char source_file[MAX_PATH];
|
||||
|
||||
char CfgFile[MAX_PATH+10] = "inis\\cdvdGigaherz.ini";
|
||||
char CfgFile[MAX_PATH+10] = "inis/cdvdGigaherz.ini";
|
||||
|
||||
void CfgSetSettingsDir( const char* dir )
|
||||
{
|
||||
// a better std::string version, but it's inconvenient for other reasons.
|
||||
//CfgFile = std::string(( dir == NULL ) ? "inis\\" : dir) + "cdvdGigaherz.ini";
|
||||
//CfgFile = std::string(( dir == NULL ) ? "inis/" : dir) + "cdvdGigaherz.ini";
|
||||
|
||||
// emulator assures a trailing slash/backslash (yay!)
|
||||
strcpy_s(CfgFile, (dir==NULL) ? "inis\\" : dir);
|
||||
strcat_s(CfgFile, "cdvdGigaherz.ini");
|
||||
strcpy_s(CfgFile, (dir==NULL) ? "inis" : dir);
|
||||
strcat_s(CfgFile, "/cdvdGigaherz.ini");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@ void (*DEV9irq)(int);
|
|||
|
||||
__aligned16 s8 dev9regs[0x10000];
|
||||
|
||||
string s_strIniPath = "inis/";
|
||||
string s_strLogPath="logs/";
|
||||
string s_strIniPath = "inis";
|
||||
string s_strLogPath="logs";
|
||||
|
||||
PluginLog Dev9Log;
|
||||
Config conf;
|
||||
|
@ -59,7 +59,7 @@ void LogInit()
|
|||
EXPORT_C_(void) DEV9setLogDir(const char* dir)
|
||||
{
|
||||
// Get the path to the log directory.
|
||||
s_strLogPath = (dir==NULL) ? "logs/" : dir;
|
||||
s_strLogPath = (dir==NULL) ? "logs" : dir;
|
||||
|
||||
// Reload the log file after updated the path
|
||||
Dev9Log.Close();
|
||||
|
@ -275,7 +275,7 @@ EXPORT_C_(DEV9handler) DEV9irqHandler(void)
|
|||
EXPORT_C_(void) DEV9setSettingsDir(const char* dir)
|
||||
{
|
||||
// Grab the ini directory.
|
||||
s_strIniPath = (dir == NULL) ? "inis/" : dir;
|
||||
s_strIniPath = (dir == NULL) ? "inis" : dir;
|
||||
}
|
||||
|
||||
// extended funcs
|
||||
|
|
|
@ -51,7 +51,7 @@ void SysMessage(const wchar_t *fmt, ...)
|
|||
|
||||
#include "Utilities/Path.h"
|
||||
|
||||
static wxString CfgFile( L"inis\\SPU2-X.ini" );
|
||||
static wxString CfgFile( L"inis/SPU2-X.ini" );
|
||||
|
||||
void CfgSetSettingsDir( const char* dir )
|
||||
{
|
||||
|
|
|
@ -59,8 +59,8 @@ wxString RegDumpFileName;
|
|||
|
||||
void CfgSetLogDir( const char* dir )
|
||||
{
|
||||
LogsFolder = (dir==NULL) ? wxString(L"logs") : fromUTF8(dir);
|
||||
DumpsFolder = (dir==NULL) ? wxString(L"logs") : fromUTF8(dir);
|
||||
LogsFolder = (dir==NULL) ? wxString(L"logs") : wxString(dir, wxConvFile);
|
||||
DumpsFolder = (dir==NULL) ? wxString(L"logs") : wxString(dir, wxConvFile);
|
||||
LogLocationSetByPcsx2 = (dir!=NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ void __LogToConsole(const char *fmt, ...) {
|
|||
}
|
||||
|
||||
void CALLBACK GSsetSettingsDir(const char* dir) {
|
||||
s_strIniPath = (dir==NULL) ? "inis/" : dir;
|
||||
s_strIniPath = (dir==NULL) ? "inis" : dir;
|
||||
}
|
||||
|
||||
void CALLBACK GSsetBaseMem(void* pmem) {
|
||||
|
|
|
@ -12,7 +12,7 @@ extern HINSTANCE hInst;
|
|||
void SaveConfig() {
|
||||
|
||||
char szValue[256];
|
||||
const std::string iniFile( s_strIniPath + "zerogs.ini" );
|
||||
const std::string iniFile( s_strIniPath + "/zerogs.ini" );
|
||||
|
||||
sprintf(szValue,"%u",conf.interlace);
|
||||
WritePrivateProfileString("Settings", "Interlace",szValue,iniFile.c_str());
|
||||
|
@ -29,7 +29,7 @@ void SaveConfig() {
|
|||
void LoadConfig() {
|
||||
|
||||
char szValue[256];
|
||||
const std::string iniFile( s_strIniPath + "zerogs.ini" );
|
||||
const std::string iniFile( s_strIniPath + "/zerogs.ini" );
|
||||
|
||||
memset(&conf, 0, sizeof(conf));
|
||||
conf.interlace = 0; // on, mode 1
|
||||
|
|
|
@ -131,7 +131,7 @@ void SaveConfig()
|
|||
Config *Conf1 = &conf;
|
||||
char szValue[256];
|
||||
|
||||
string iniFile( s_strIniPath + "zerospu2.ini" );
|
||||
string iniFile( s_strIniPath + "/zerospu2.ini" );
|
||||
|
||||
sprintf_s(szValue,"%u",Conf1->Log);
|
||||
WritePrivateProfileString("Interface", "Logging",szValue, iniFile.c_str());
|
||||
|
@ -145,7 +145,7 @@ void LoadConfig()
|
|||
Config *Conf1 = &conf;
|
||||
char szValue[256];
|
||||
|
||||
string iniFile( s_strIniPath + "zerospu2.ini" );
|
||||
string iniFile( s_strIniPath + "/zerospu2.ini" );
|
||||
|
||||
fopen_s(&fp, iniFile.c_str(), "rt");//check if zerospu2.ini really exists
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ s32 s_buffers[NSSIZE][2]; // left and right buffers
|
|||
// mixer thread variables
|
||||
bool s_bThreadExit = true;
|
||||
s32 s_nDropPacket = 0;
|
||||
string s_strIniPath( "inis/" );
|
||||
string s_strIniPath( "inis" );
|
||||
|
||||
#ifdef _WIN32
|
||||
LARGE_INTEGER g_counterfreq;
|
||||
|
@ -201,7 +201,7 @@ void __LogToConsole(const char *fmt, ...)
|
|||
|
||||
void CALLBACK SPU2setSettingsDir(const char* dir)
|
||||
{
|
||||
s_strIniPath = (dir==NULL) ? "inis/" : dir;
|
||||
s_strIniPath = (dir==NULL) ? "inis" : dir;
|
||||
}
|
||||
|
||||
void InitApi()
|
||||
|
|
|
@ -46,7 +46,7 @@ float fFPS = 0;
|
|||
|
||||
void (*GSirq)();
|
||||
u8* g_pBasePS2Mem = NULL;
|
||||
string s_strIniPath("inis/"); // Air's new ini path (r2361)
|
||||
wxString s_strIniPath(L"inis"); // Air's new ini path (r2361)
|
||||
|
||||
bool SaveStateExists = true; // We could not know save slot status before first change occured
|
||||
const char* SaveStateFile = NULL; // Name of SaveFile for access check.
|
||||
|
@ -112,7 +112,7 @@ void CALLBACK GSsetBaseMem(void* pmem)
|
|||
|
||||
void CALLBACK GSsetSettingsDir(const char* dir)
|
||||
{
|
||||
s_strIniPath = (dir == NULL) ? "inis/" : dir;
|
||||
s_strIniPath = (dir == NULL) ? wxString(L"inis") : wxString(dir, wxConvFile);
|
||||
}
|
||||
|
||||
void CALLBACK GSsetLogDir(const char* dir)
|
||||
|
|
|
@ -64,7 +64,7 @@ extern "C" char* CALLBACK PS2EgetLibName(void);
|
|||
#include "Utilities/MemcpyFast.h"
|
||||
#define memcpy_amd memcpy_fast
|
||||
|
||||
extern std::string s_strIniPath; // Air's new (r2361) new constant for ini file path
|
||||
extern wxString s_strIniPath; // Air's new (r2361) new constant for ini file path
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "GS.h"
|
||||
#include "Win32.h"
|
||||
#include "Utilities/Path.h"
|
||||
|
||||
extern HINSTANCE hInst;
|
||||
|
||||
|
@ -9,7 +10,7 @@ extern HINSTANCE hInst;
|
|||
void SaveConfig()
|
||||
{
|
||||
wxChar szValue[256];
|
||||
const wxString iniFile( wxString::FromUTF8(s_strIniPath.c_str()) + L"zzogl-pg.ini");
|
||||
const wxString iniFile(Path::Combine(s_strIniPath, L"zzogl-pg.ini"));
|
||||
|
||||
wxSprintf(szValue, L"%u", conf.interlace);
|
||||
WritePrivateProfileString(L"Settings", L"Interlace", szValue, iniFile);
|
||||
|
@ -32,7 +33,7 @@ void SaveConfig()
|
|||
void LoadConfig()
|
||||
{
|
||||
wxChar szValue[256];
|
||||
const wxString iniFile( wxString::FromUTF8(s_strIniPath.c_str()) + L"zzogl-pg.ini");
|
||||
const wxString iniFile(Path::Combine(s_strIniPath, L"zzogl-pg.ini"));
|
||||
|
||||
memset(&conf, 0, sizeof(conf));
|
||||
conf.interlace = 0; // on, mode 1
|
||||
|
@ -50,7 +51,7 @@ void LoadConfig()
|
|||
if (!fp)
|
||||
{
|
||||
SysMessage("Unable to open ZZOgl-PG's ini file!");
|
||||
CreateDirectory(wxString::FromUTF8(s_strIniPath.c_str()), NULL);
|
||||
CreateDirectory(s_strIniPath, NULL);
|
||||
SaveConfig();//save and return
|
||||
return ;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include "ZZLog.h"
|
||||
#include <list>
|
||||
#include <list>
|
||||
#include <cstring>
|
||||
|
||||
extern GSconf conf;
|
||||
|
@ -59,7 +59,7 @@ void ZZAddMessage(const char* pstr, u32 ms)
|
|||
|
||||
namespace ZZLog
|
||||
{
|
||||
std::string s_strLogPath("logs/");
|
||||
std::string s_strLogPath("logs");
|
||||
FILE *gsLog;
|
||||
|
||||
bool IsLogging()
|
||||
|
@ -71,7 +71,7 @@ bool IsLogging()
|
|||
|
||||
void Open()
|
||||
{
|
||||
const std::string LogFile(s_strLogPath + "GSzzogl.log");
|
||||
const std::string LogFile(s_strLogPath + "/GSzzogl.log");
|
||||
|
||||
gsLog = fopen(LogFile.c_str(), "w");
|
||||
if (gsLog != NULL)
|
||||
|
@ -92,7 +92,7 @@ void Close()
|
|||
void SetDir(const char* dir)
|
||||
{
|
||||
// Get the path to the log directory.
|
||||
s_strLogPath = (dir==NULL) ? "logs/" : dir;
|
||||
s_strLogPath = (dir==NULL) ? "logs" : dir;
|
||||
|
||||
// Reload previously open log file
|
||||
if (gsLog) {
|
||||
|
|
Loading…
Reference in New Issue