[Glide64] Make texture dir private

This commit is contained in:
zilmar 2017-03-10 08:12:37 +11:00
parent 8d7cbae52b
commit 154099d42f
3 changed files with 11 additions and 7 deletions

View File

@ -706,7 +706,7 @@ int InitGfx()
voodoo.sup_32bit_tex ? 32 : 16, // max texture bpp supported by hardware
options,
g_settings->ghq_cache_size * 1024 * 1024, // cache texture to system memory
g_settings->texture_dir.c_str(),
g_settings->texture_dir(),
rdp.RomName, // name of ROM. must be no longer than 256 characters
DisplayLoadProgress);
}

View File

@ -11,10 +11,11 @@ int GetCurrentResIndex(void);
extern uint32_t g_NativeWidth, g_NativeHeight;
#endif
short Set_basic_mode = 0, Set_texture_dir = 0, Set_log_dir = 0, Set_log_flush = 0;
short Set_basic_mode = 0, Set_log_dir = 0, Set_log_flush = 0;
extern int g_width, g_height;
CSettings::CSettings() :
m_Set_texture_dir(0),
m_dirty(false),
m_res_x(GetScreenResWidth(GetDefaultScreenRes())),
m_scr_res_x(GetScreenResWidth(GetDefaultScreenRes())),
@ -34,7 +35,7 @@ CSettings::CSettings() :
m_frame_buffer(0),
m_fb_crc_mode(fbcrcFast),
//Texture filtering options
texture_dir(""),
m_texture_dir(""),
m_ghq_fltr(TextureFilter_None),
m_ghq_enht(TextureEnht_None),
ghq_cmpr(0),
@ -110,7 +111,7 @@ void CSettings::RegisterSettings(void)
{
SetModuleName("default");
Set_basic_mode = FindSystemSettingId("Basic Mode");
Set_texture_dir = FindSystemSettingId("Dir:Texture");
m_Set_texture_dir = FindSystemSettingId("Dir:Texture");
Set_log_flush = FindSystemSettingId("Log Auto Flush");
Set_log_dir = FindSystemSettingId("Dir:Log");
@ -443,8 +444,8 @@ void CSettings::ReadSettings()
char texture_dir[260];
memset(texture_dir, 0, sizeof(texture_dir));
GetSystemSettingSz(Set_texture_dir, texture_dir, sizeof(texture_dir));
this->texture_dir = texture_dir;
GetSystemSettingSz(m_Set_texture_dir, texture_dir, sizeof(texture_dir));
m_texture_dir = texture_dir;
m_ghq_fltr = (TextureFilter_t)GetSetting(Set_ghq_fltr);
this->ghq_cmpr = (uint8_t)GetSetting(Set_ghq_cmpr);
m_ghq_enht = (TextureEnhancement_t)GetSetting(Set_ghq_enht);

View File

@ -190,7 +190,7 @@ public:
inline FBCRCMODE_t fb_crc_mode(void) const { return m_fb_crc_mode; }
//Texture filtering options
std::string texture_dir;
inline const char * texture_dir(void) const { return m_texture_dir.c_str(); }
inline TextureFilter_t ghq_fltr(void) const { return m_ghq_fltr; }
inline TextureEnhancement_t ghq_enht(void) const { return m_ghq_enht; }
int ghq_cmpr;
@ -282,6 +282,8 @@ private:
((CSettings *)_this)->SettingsChanged();
}
short m_Set_texture_dir;
bool m_dirty;
bool m_FlushLogs;
char m_log_dir[260];
@ -300,6 +302,7 @@ private:
bool m_advanced_options;
bool m_texenh_options;
bool m_vsync;
std::string m_texture_dir;
TextureFilter_t m_ghq_fltr;
TextureEnhancement_t m_ghq_enht;
ucode_t m_ucode;