mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Linux global build. At least the basic footwork is done here.
Basic usage: "sudo scons install=global install" Hopefully this doesn't break builds on Macs. I have tested this on linux and windows. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4994 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
|
||||
#include "IniFile.h"
|
||||
#include "Debugger.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
#include "VideoConfig.h"
|
||||
#include "../Globals.h"
|
||||
@ -75,7 +76,7 @@ void GFXDebuggerDX9::OnClose(wxCloseEvent& event)
|
||||
void GFXDebuggerDX9::SaveSettings() const
|
||||
{
|
||||
IniFile file;
|
||||
file.Load(DEBUGGER_CONFIG_FILE);
|
||||
file.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
|
||||
// TODO: make this work when we close the entire program too, currently on total close we get
|
||||
// weird values, perhaps because of some conflict with the rendering window
|
||||
@ -100,13 +101,13 @@ void GFXDebuggerDX9::SaveSettings() const
|
||||
|
||||
//file.Set("VideoWindow", "ConfBits", g_Config.iLog);
|
||||
|
||||
file.Save(DEBUGGER_CONFIG_FILE);
|
||||
file.Save(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
}
|
||||
|
||||
void GFXDebuggerDX9::LoadSettings()
|
||||
{
|
||||
IniFile file;
|
||||
file.Load(DEBUGGER_CONFIG_FILE);
|
||||
file.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
|
||||
int x = 100, y = 100, w = 100, h = 100;
|
||||
file.Get("VideoWindow", "x", &x, GetPosition().x);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "resource.h"
|
||||
#include "W32Util/PropertySheet.h"
|
||||
#include "W32Util/ShellUtil.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
#include "D3DBase.h"
|
||||
|
||||
@ -137,7 +138,7 @@ struct TabDirect3D : public W32Util::Tab
|
||||
g_Config.bFullscreen = Button_GetCheck(GetDlgItem(hDlg, IDC_FULLSCREENENABLE)) ? true : false;
|
||||
g_Config.bVSync = Button_GetCheck(GetDlgItem(hDlg, IDC_VSYNC)) ? true : false;
|
||||
g_Config.RenderToMainframe = Button_GetCheck(GetDlgItem(hDlg, IDC_RENDER_TO_MAINWINDOW)) ? true : false;
|
||||
g_Config.Save(FULL_CONFIG_DIR "gfx_dx9.ini");
|
||||
g_Config.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx9.ini").c_str());
|
||||
}
|
||||
};
|
||||
|
||||
@ -211,7 +212,7 @@ struct TabAdvanced : public W32Util::Tab
|
||||
g_Config.bEFBCopyDisable = Button_GetCheck(GetDlgItem(hDlg,IDC_ENABLEEFBCOPY)) ? false : true;
|
||||
g_Config.bCopyEFBToTexture = Button_GetCheck(GetDlgItem(hDlg,IDC_EFBTORAM)) ? false : true;
|
||||
|
||||
g_Config.Save(FULL_CONFIG_DIR "gfx_dx9.ini");
|
||||
g_Config.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx9.ini").c_str());
|
||||
|
||||
if( D3D::dev != NULL ) {
|
||||
D3D::SetRenderState( D3DRS_FILLMODE, g_Config.bWireFrame ? D3DFILL_WIREFRAME : D3DFILL_SOLID );
|
||||
@ -264,7 +265,7 @@ struct TabEnhancements : public W32Util::Tab
|
||||
g_Config.bForceFiltering = Button_GetCheck(GetDlgItem(hDlg, IDC_FORCEFILTERING)) ? true : false;
|
||||
g_Config.bHiresTextures = Button_GetCheck(GetDlgItem(hDlg, IDC_LOADHIRESTEXTURE)) ? true : false;
|
||||
g_Config.bCopyEFBScaled = Button_GetCheck(GetDlgItem(hDlg,IDC_EFBSCALEDCOPY)) ? true : false;
|
||||
g_Config.Save(FULL_CONFIG_DIR "gfx_dx9.ini");
|
||||
g_Config.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx9.ini").c_str());
|
||||
}
|
||||
};
|
||||
|
||||
@ -274,7 +275,7 @@ void DlgSettings_Show(HINSTANCE hInstance, HWND _hParent)
|
||||
bool tfoe = g_Config.bTexFmtOverlayEnable;
|
||||
bool tfoc = g_Config.bTexFmtOverlayCenter;
|
||||
|
||||
g_Config.Load(FULL_CONFIG_DIR "gfx_dx9.ini");
|
||||
g_Config.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx9.ini").c_str());
|
||||
W32Util::PropSheet sheet;
|
||||
sheet.Add(new TabDirect3D, (LPCTSTR)IDD_SETTINGS,_T("Direct3D"));
|
||||
sheet.Add(new TabEnhancements, (LPCTSTR)IDD_ENHANCEMENTS,_T("Enhancements"));
|
||||
@ -295,4 +296,4 @@ void DlgSettings_Show(HINSTANCE hInstance, HWND _hParent)
|
||||
{
|
||||
TextureCache::Invalidate(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -150,11 +150,11 @@ void PixelShaderCache::Init()
|
||||
s_DepthMatrixProgram = D3D::CompileAndCreatePixelShader(pprog, (int)strlen(pprog));
|
||||
Clear();
|
||||
|
||||
if (!File::Exists(FULL_SHADERCACHE_DIR))
|
||||
File::CreateDir(FULL_SHADERCACHE_DIR);
|
||||
if (!File::Exists(File::GetUserPath(D_SHADERCACHE_IDX)))
|
||||
File::CreateDir(File::GetUserPath(D_SHADERCACHE_IDX));
|
||||
|
||||
char cache_filename[MAX_PATH];
|
||||
sprintf(cache_filename, "%s%s-ps.cache", FULL_SHADERCACHE_DIR, globals->unique_id);
|
||||
sprintf(cache_filename, "%s%s-ps.cache", File::GetUserPath(D_SHADERCACHE_IDX), globals->unique_id);
|
||||
PixelShaderCacheInserter inserter;
|
||||
int read_items = g_ps_disk_cache.OpenAndRead(cache_filename, &inserter);
|
||||
}
|
||||
@ -231,7 +231,7 @@ bool PixelShaderCache::SetShader(bool dstAlpha)
|
||||
if (g_ActiveConfig.iLog & CONF_SAVESHADERS && code) {
|
||||
static int counter = 0;
|
||||
char szTemp[MAX_PATH];
|
||||
sprintf(szTemp, "%s/ps_%04i.txt", FULL_DUMP_DIR, counter++);
|
||||
sprintf(szTemp, "%sps_%04i.txt", File::GetUserPath(D_DUMP_IDX), counter++);
|
||||
|
||||
SaveData(szTemp, code);
|
||||
}
|
||||
@ -290,4 +290,4 @@ std::string PixelShaderCache::GetCurrentShaderCode()
|
||||
else
|
||||
return "(no shader)\n";
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "StringUtil.h"
|
||||
#include "Common.h"
|
||||
#include "FileUtil.h"
|
||||
#include "Thread.h"
|
||||
#include "Timer.h"
|
||||
#include "Statistics.h"
|
||||
@ -616,7 +617,7 @@ static void EFBTextureToD3DBackBuffer(const EFBRectangle& sourceRc)
|
||||
else
|
||||
{
|
||||
char msg [255];
|
||||
sprintf(msg, "Dumping Frames to \"%s/framedump0.avi\" (%dx%d RGB24)", FULL_FRAMES_DIR, s_recordWidth, s_recordHeight);
|
||||
sprintf(msg, "Dumping Frames to \"%sframedump0.avi\" (%dx%d RGB24)", File::GetUserPath(D_DUMPFRAMES_IDX), s_recordWidth, s_recordHeight);
|
||||
OSD::AddMessage(msg, 2000);
|
||||
}
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width,
|
||||
const char* uniqueId = globals->unique_id;
|
||||
bool bCheckedDumpDir = false;
|
||||
|
||||
sprintf(szDir, "%s/%s", FULL_DUMP_TEXTURES_DIR, uniqueId);
|
||||
sprintf(szDir, "%s%s", File::GetUserPath(D_DUMPTEXTURES_IDX), uniqueId);
|
||||
|
||||
if (!bCheckedDumpDir)
|
||||
{
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "D3DShader.h"
|
||||
#include "TextureCache.h"
|
||||
#include "Math.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
namespace TextureConverter
|
||||
{
|
||||
@ -124,7 +125,7 @@ LPDIRECT3DPIXELSHADER9 GetOrCreateEncodingShader(u32 format)
|
||||
if (g_ActiveConfig.iLog & CONF_SAVESHADERS && shader) {
|
||||
static int counter = 0;
|
||||
char szTemp[MAX_PATH];
|
||||
sprintf(szTemp, "%s/enc_%04i.txt", FULL_DUMP_DIR, counter++);
|
||||
sprintf(szTemp, "%senc_%04i.txt", File::GetUserPath(D_DUMP_IDX), counter++);
|
||||
|
||||
SaveData(szTemp, shader);
|
||||
}
|
||||
|
@ -170,11 +170,11 @@ void VertexShaderCache::Init()
|
||||
Clear();
|
||||
delete [] vSimpleProg;
|
||||
|
||||
if (!File::Exists(FULL_SHADERCACHE_DIR))
|
||||
File::CreateDir(FULL_SHADERCACHE_DIR);
|
||||
if (!File::Exists(File::GetUserPath(D_SHADERCACHE_IDX)))
|
||||
File::CreateDir(File::GetUserPath(D_SHADERCACHE_IDX));
|
||||
|
||||
char cache_filename[MAX_PATH];
|
||||
sprintf(cache_filename, "%s%s-vs.cache", FULL_SHADERCACHE_DIR, globals->unique_id);
|
||||
sprintf(cache_filename, "%s%s-vs.cache", File::GetUserPath(D_SHADERCACHE_IDX), globals->unique_id);
|
||||
VertexShaderCacheInserter inserter;
|
||||
int read_items = g_vs_disk_cache.OpenAndRead(cache_filename, &inserter);
|
||||
}
|
||||
@ -280,4 +280,4 @@ std::string VertexShaderCache::GetCurrentShaderCode()
|
||||
{
|
||||
return "(N/A)\n";
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -232,7 +232,7 @@ void Initialize(void *init)
|
||||
g_VideoInitialize = *_pVideoInitialize;
|
||||
InitXFBConvTables();
|
||||
|
||||
g_Config.Load(FULL_CONFIG_DIR "gfx_dx9.ini");
|
||||
g_Config.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx9.ini").c_str());
|
||||
g_Config.GameIniLoad(globals->game_ini);
|
||||
UpdateProjectionHack(g_Config.iPhackvalue); // DX9 projection hack could be disabled by commenting out this line
|
||||
UpdateActiveConfig();
|
||||
|
Reference in New Issue
Block a user