[Glide64] make fb_crc_mode a private member of CSettings
This commit is contained in:
parent
98cd937385
commit
ea35a02614
|
@ -188,7 +188,7 @@ void CSettings::RegisterSettings(void)
|
|||
game_setting(Set_hires_buf_clear, "hires_buf_clear", true);
|
||||
game_setting(Set_fb_read_alpha, "fb_read_alpha", false);
|
||||
game_setting(Set_useless_is_useless, "useless_is_useless", false);
|
||||
game_setting(Set_fb_crc_mode, "fb_crc_mode", 1);
|
||||
game_setting(Set_fb_crc_mode, "fb_crc_mode", fbcrcFast);
|
||||
game_setting_default(Set_filtering, "filtering", Set_filtering_default);
|
||||
game_setting_default(Set_fog, "fog", Set_fog_default);
|
||||
game_setting_default(Set_buff_clear, "buff_clear", Set_buff_clear_default);
|
||||
|
@ -506,9 +506,6 @@ void CSettings::ReadGameSettings(const char * name)
|
|||
g_settings->zmode_compare_less = GetSetting(Set_zmode_compare_less);
|
||||
g_settings->old_style_adither = GetSetting(Set_old_style_adither);
|
||||
g_settings->n64_z_scale = GetSetting(Set_n64_z_scale);
|
||||
int fb_crc_mode = GetSetting(Set_fb_crc_mode);
|
||||
|
||||
if (fb_crc_mode >= 0) g_settings->fb_crc_mode = (CSettings::FBCRCMODE)fb_crc_mode;
|
||||
|
||||
g_settings->fog = GetSetting(g_romopen ? Set_fog : Set_fog_default);
|
||||
g_settings->buff_clear = GetSetting(g_romopen ? Set_buff_clear : Set_buff_clear_default);
|
||||
|
@ -568,6 +565,7 @@ void CSettings::ReadGameSettings(const char * name)
|
|||
else if (read_back_to_screen == 0) { fb_remove_bits |= fb_read_back_to_screen | fb_read_back_to_screen2; }
|
||||
|
||||
g_settings->UpdateFrameBufferBits(fb_add_bits, fb_remove_bits);
|
||||
m_fb_crc_mode = (FBCRCMODE_t)GetSetting(Set_fb_crc_mode);
|
||||
|
||||
SetFiltering((Filtering_t)GetSetting(g_romopen ? Set_filtering : Set_filtering_default));
|
||||
SetSwapMode((SwapMode_t)GetSetting(g_romopen ? Set_swapmode : Set_swapmode_default));
|
||||
|
|
|
@ -119,12 +119,12 @@ public:
|
|||
int buff_clear;
|
||||
|
||||
|
||||
enum FBCRCMODE
|
||||
{
|
||||
enum FBCRCMODE_t
|
||||
{
|
||||
fbcrcNone = 0,
|
||||
fbcrcFast = 1,
|
||||
fbcrcSafe = 2
|
||||
} fb_crc_mode;
|
||||
};
|
||||
|
||||
inline bool fb_emulation_enabled(void) const { return ((m_frame_buffer&fb_emulation) != 0); }
|
||||
inline bool fb_ref_enabled(void) const { return ((m_frame_buffer&fb_ref) != 0); }
|
||||
|
@ -150,6 +150,9 @@ public:
|
|||
inline SwapMode_t swapmode(void) const { return m_swapmode; }
|
||||
inline PixelLevelOfDetail_t lodmode(void) const { return m_lodmode; }
|
||||
inline AspectMode_t aspectmode(void) const { return m_aspectmode; }
|
||||
|
||||
inline FBCRCMODE_t fb_crc_mode(void) const { return m_fb_crc_mode; }
|
||||
|
||||
//Texture filtering options
|
||||
std::string texture_dir;
|
||||
int ghq_fltr;
|
||||
|
@ -232,6 +235,7 @@ private:
|
|||
char m_log_dir[260];
|
||||
AspectMode_t m_aspectmode;
|
||||
uint32_t m_frame_buffer;
|
||||
FBCRCMODE_t m_fb_crc_mode;
|
||||
ScreenRotate_t m_rotate;
|
||||
Filtering_t m_filtering;
|
||||
SwapMode_t m_swapmode;
|
||||
|
|
|
@ -669,11 +669,11 @@ static uint32_t CalcCRC(TBUFF_COLOR_IMAGE * pTCI)
|
|||
{
|
||||
pTCI->crc = 0; //Since fb content changes each frame, crc check is meaningless.
|
||||
}
|
||||
else if (g_settings->fb_crc_mode == CSettings::fbcrcFast)
|
||||
else if (g_settings->fb_crc_mode() == CSettings::fbcrcFast)
|
||||
{
|
||||
result = *((uint32_t*)(gfx.RDRAM + pTCI->addr + (pTCI->end_addr - pTCI->addr) / 2));
|
||||
}
|
||||
else if (g_settings->fb_crc_mode == CSettings::fbcrcSafe)
|
||||
else if (g_settings->fb_crc_mode() == CSettings::fbcrcSafe)
|
||||
{
|
||||
uint8_t * pSrc = gfx.RDRAM + pTCI->addr;
|
||||
const uint32_t nSize = pTCI->end_addr - pTCI->addr;
|
||||
|
|
Loading…
Reference in New Issue