From 80cd85b9a92316a02936a64d980b9a78f3d21cd2 Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 21 Jan 2016 06:09:35 +1100 Subject: [PATCH] [Glide64] Remove wxString usage from Glide64/rdp.cpp --- Source/Glide64/rdp.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Source/Glide64/rdp.cpp b/Source/Glide64/rdp.cpp index 088f46b4a..4e7017edc 100644 --- a/Source/Glide64/rdp.cpp +++ b/Source/Glide64/rdp.cpp @@ -47,6 +47,7 @@ #include "TexBuffer.h" #include "FBtoScreen.h" #include "CRC.h" +#include const int NumOfFormats = 3; SCREEN_SHOT_FORMAT ScreenShotFormats[NumOfFormats] = { { wxT("BMP"), wxT("bmp"), wxBITMAP_TYPE_BMP }, { wxT("PNG"), wxT("png"), wxBITMAP_TYPE_PNG }, { wxT("JPEG"), wxT("jpeg"), wxBITMAP_TYPE_JPEG } }; @@ -312,14 +313,12 @@ void microcheck() d = ((char*)gfx.RDRAM)[i^3]; ucf.write (&d, 1); } - ucf.close (); + ucf.close(); #endif FRDP("ucode = %08lx\n", uc_crc); - wxString str; - str.Printf(wxT("%08lx"), uc_crc); - RegisterSetting(Set_ucodeLookup, Data_DWORD_RDB_Setting, str, "ucode", (unsigned int)-2, NULL); + RegisterSetting(Set_ucodeLookup, Data_DWORD_RDB_Setting, stdstr_f(wxT("%08lx"), uc_crc).c_str(), "ucode", (unsigned int)-2, NULL); int uc = GetSetting(Set_ucodeLookup); if (uc == -2 && ucode_error_report) @@ -327,8 +326,7 @@ void microcheck() settings.ucode = GetSetting(Set_ucode); ReleaseGfx(); - str.Printf(_T("Error: uCode crc not found in INI, using currently selected uCode\n\n%08lx"), uc_crc); - wxMessageBox(str, _T("Error"), wxOK | wxICON_EXCLAMATION, GFXWindow); + wxMessageBox(stdstr_f("Error: uCode crc not found in INI, using currently selected uCode\n\n%08lx", uc_crc).c_str(), "Error", wxOK | wxICON_EXCLAMATION, GFXWindow); ucode_error_report = FALSE; // don't report any more ucode errors from this game } @@ -337,8 +335,7 @@ void microcheck() settings.ucode = GetSetting(Set_ucode); ReleaseGfx(); - str.Printf(_T("Error: Unsupported uCode!\n\ncrc: %08lx"), uc_crc); - wxMessageBox(str, _T("Error"), wxOK | wxICON_EXCLAMATION, GFXWindow); + wxMessageBox(stdstr_f("Error: Unsupported uCode!\n\ncrc: %08lx", uc_crc).c_str(), "Error", wxOK | wxICON_EXCLAMATION, GFXWindow); ucode_error_report = FALSE; // don't report any more ucode errors from this game } @@ -353,7 +350,9 @@ void microcheck() rdp.persp_supported = FALSE; } else if (settings.texture_correction) + { rdp.persp_supported = TRUE; + } } } @@ -601,7 +600,7 @@ EXPORT void CALL ProcessDList(void) { hhkLowLevelKybd = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, hInstance, 0); - } +} #endif LOG("ProcessDList ()\n"); @@ -799,7 +798,7 @@ EXPORT void CALL ProcessDList(void) else to_fullscreen = TRUE; return; - } + } #endif if (fb_emulation_enabled) @@ -822,7 +821,7 @@ EXPORT void CALL ProcessDList(void) CI_SET = FALSE; } LRDP("ProcessDList end\n"); -} + } // undef - undefined instruction, always ignore static void undef()