diff --git a/pcsx2/gui/Debugger/DebuggerLists.h b/pcsx2/gui/Debugger/DebuggerLists.h index be5c62b676..cee8d51a34 100644 --- a/pcsx2/gui/Debugger/DebuggerLists.h +++ b/pcsx2/gui/Debugger/DebuggerLists.h @@ -21,7 +21,7 @@ struct GenericListViewColumn { - wchar_t *name; + const wchar_t *name; float size; int flags; }; diff --git a/plugins/GSdx/GSLinuxDialog.cpp b/plugins/GSdx/GSLinuxDialog.cpp index ad1667f17e..431492c419 100644 --- a/plugins/GSdx/GSLinuxDialog.cpp +++ b/plugins/GSdx/GSLinuxDialog.cpp @@ -29,23 +29,6 @@ GtkWidget *shadeboost_check, *paltex_check, *fba_check, *aa_check, *native_res_ GtkWidget *sb_contrast, *sb_brightness, *sb_saturation; GtkWidget *resx_spin, *resy_spin; -static void SysMessage(const char *fmt, ...) -{ - va_list list; - char msg[512]; - - va_start(list, fmt); - vsprintf(msg, fmt, list); - va_end(list); - - if (msg[strlen(msg)-1] == '\n') msg[strlen(msg) - 1] = 0; - - GtkWidget *dialog; - dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "%s", msg); - gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); -} - GtkWidget* CreateRenderComboBox() { GtkWidget *render_combo_box; diff --git a/plugins/GSdx/GSShaderOGL.cpp b/plugins/GSdx/GSShaderOGL.cpp index f1ee3dad30..3ec2207322 100644 --- a/plugins/GSdx/GSShaderOGL.cpp +++ b/plugins/GSdx/GSShaderOGL.cpp @@ -128,7 +128,7 @@ void GSShaderOGL::GS(GLuint s) } } -void GSShaderOGL::SetUniformBinding(GLuint prog, GLchar* name, GLuint binding) +void GSShaderOGL::SetUniformBinding(GLuint prog, const GLchar* name, GLuint binding) { GLuint index; index = gl_GetUniformBlockIndex(prog, name); @@ -137,7 +137,7 @@ void GSShaderOGL::SetUniformBinding(GLuint prog, GLchar* name, GLuint binding) } } -void GSShaderOGL::SetSamplerBinding(GLuint prog, GLchar* name, GLuint binding) +void GSShaderOGL::SetSamplerBinding(GLuint prog, const GLchar* name, GLuint binding) { GLint loc = gl_GetUniformLocation(prog, name); if (loc != -1) { diff --git a/plugins/GSdx/GSShaderOGL.h b/plugins/GSdx/GSShaderOGL.h index d30c2ca95f..b98a362af5 100644 --- a/plugins/GSdx/GSShaderOGL.h +++ b/plugins/GSdx/GSShaderOGL.h @@ -35,8 +35,8 @@ class GSShaderOGL { void SetupUniform(); void SetupRessources(); - void SetUniformBinding(GLuint prog, GLchar* name, GLuint binding); - void SetSamplerBinding(GLuint prog, GLchar* name, GLuint binding); + void SetUniformBinding(GLuint prog, const GLchar* name, GLuint binding); + void SetSamplerBinding(GLuint prog, const GLchar* name, GLuint binding); bool ValidateShader(GLuint p); bool ValidateProgram(GLuint p); diff --git a/plugins/zzogl-pg/opengl/GSmain.cpp b/plugins/zzogl-pg/opengl/GSmain.cpp index e08766e041..99267c99a2 100644 --- a/plugins/zzogl-pg/opengl/GSmain.cpp +++ b/plugins/zzogl-pg/opengl/GSmain.cpp @@ -65,11 +65,11 @@ unsigned char zgsbuild = VER; unsigned char zgsminor = 0; #ifdef _DEBUG -char *libraryName = "ZZ Ogl PG (Debug) "; +const char *libraryName = "ZZ Ogl PG (Debug) "; #elif defined(ZEROGS_DEVBUILD) -char *libraryName = "ZZ Ogl PG (Dev)"; +const char *libraryName = "ZZ Ogl PG (Dev)"; #else -char *libraryName = "ZZ Ogl PG "; +const char *libraryName = "ZZ Ogl PG "; #endif extern int g_nPixelShaderVer, g_nFrameRender, g_nFramesSkipped; @@ -99,7 +99,7 @@ EXPORT_C_(u32) PS2EgetLibType() EXPORT_C_(char*) PS2EgetLibName() { - return libraryName; + return (char*) libraryName; } EXPORT_C_(u32) PS2EgetLibVersion2(u32 type) @@ -393,7 +393,7 @@ EXPORT_C_(void) GSchangeSaveState(int newstate, const char* filename) SaveStateExists = (access(SaveStateFile, 0) == 0); } -static bool get_snapshot_filename(char *filename, char* path, const char* extension) +static bool get_snapshot_filename(char *filename, const char* path, const char* extension) { FUNCLOG @@ -440,7 +440,7 @@ EXPORT_C_(void) GSmakeSnapshot(char *path) FUNCLOG char filename[256]; - if (get_snapshot_filename(filename, path, (conf.zz_options.tga_snap) ? "bmp" : "jpg")) + if (get_snapshot_filename(filename, (const char*)path, (conf.zz_options.tga_snap) ? "bmp" : "jpg")) SaveSnapshot(filename); } diff --git a/plugins/zzogl-pg/opengl/Mem_Tables.cpp b/plugins/zzogl-pg/opengl/Mem_Tables.cpp index 93e9c66efc..ea9be50e8d 100644 --- a/plugins/zzogl-pg/opengl/Mem_Tables.cpp +++ b/plugins/zzogl-pg/opengl/Mem_Tables.cpp @@ -346,7 +346,7 @@ u32** g_pageTableNew[MAX_PSM] = {NULL,}; 32Z, 24Z, 16Z, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 16SZ, NULL, NULL, NULL, NULL, NULL }; */ -char* psm_name[64] = +const char* psm_name[64] = { "PSMCT32", "PSMCT24", "PSMCT16", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "PSMCT16S", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "PSMT8", "PSMT4", NULL, NULL, NULL, diff --git a/plugins/zzogl-pg/opengl/Profile.cpp b/plugins/zzogl-pg/opengl/Profile.cpp index 9e1bd81c34..290a23d5e9 100644 --- a/plugins/zzogl-pg/opengl/Profile.cpp +++ b/plugins/zzogl-pg/opengl/Profile.cpp @@ -206,7 +206,7 @@ u64 DVProfWriteStruct(FILE* f, DVPROFSTRUCT* p, int ident) return utime; } -void DVProfWrite(char* pfilename, u32 frames) +void DVProfWrite(const char* pfilename, u32 frames) { assert(pfilename != NULL); FILE* f = fopen(pfilename, "wb"); diff --git a/plugins/zzogl-pg/opengl/Profile.h b/plugins/zzogl-pg/opengl/Profile.h index b6e17b7af3..0c621f98ca 100644 --- a/plugins/zzogl-pg/opengl/Profile.h +++ b/plugins/zzogl-pg/opengl/Profile.h @@ -101,7 +101,7 @@ static __forceinline u64 GetCPUTicks() // IMPORTANT: For every Register there must be an End void DVProfRegister(char* pname); // first checks if this profiler exists in g_listProfilers void DVProfEnd(u32 dwUserData); -void DVProfWrite(char* pfilename, u32 frames = 0); +void DVProfWrite(const char* pfilename, u32 frames = 0); void DVProfClear(); // clears all the profilers #define DVPROFILE diff --git a/plugins/zzogl-pg/opengl/Util.h b/plugins/zzogl-pg/opengl/Util.h index 38f0795286..adbed89793 100644 --- a/plugins/zzogl-pg/opengl/Util.h +++ b/plugins/zzogl-pg/opengl/Util.h @@ -317,8 +317,8 @@ extern void SysCloseLibrary(void *lib); // Closes Library extern void SysMessage(const char *fmt, ...); #ifdef ZEROGS_DEVBUILD -extern char* EFFECT_NAME; -extern char* EFFECT_DIR; +extern char EFFECT_NAME[256]; +extern char EFFECT_DIR[256]; extern u32 g_nGenVars, g_nTexVars, g_nAlphaVars, g_nResolve; extern bool g_bSaveTrans, g_bUpdateEffect, g_bSaveTex, g_bSaveResolved; #endif diff --git a/plugins/zzogl-pg/opengl/ZZoglCreate.cpp b/plugins/zzogl-pg/opengl/ZZoglCreate.cpp index ae9c6aa50d..38fa993fa1 100644 --- a/plugins/zzogl-pg/opengl/ZZoglCreate.cpp +++ b/plugins/zzogl-pg/opengl/ZZoglCreate.cpp @@ -86,8 +86,8 @@ extern u8* s_lpShaderResources; // String's for shader file in developer mode //#ifdef ZEROGS_DEVBUILD -char* EFFECT_NAME = ""; -char* EFFECT_DIR = ""; +char EFFECT_NAME[256]; +char EFFECT_DIR[256]; //#endif ///////////////////// diff --git a/plugins/zzogl-pg/opengl/ZZoglSave.cpp b/plugins/zzogl-pg/opengl/ZZoglSave.cpp index fe9f8f4fbb..2ca5fdd70f 100644 --- a/plugins/zzogl-pg/opengl/ZZoglSave.cpp +++ b/plugins/zzogl-pg/opengl/ZZoglSave.cpp @@ -33,11 +33,11 @@ extern void ZZGSStateReset(); // Hack for save game compatible! #ifdef _DEBUG -char *libraryNameX = "ZeroGS-Pg OpenGL (Debug) "; +const char *libraryNameX = "ZeroGS-Pg OpenGL (Debug) "; #elif defined(ZEROGS_DEVBUILD) -char *libraryNameX = "ZeroGS-Pg OpenGL (Dev) "; +const char *libraryNameX = "ZeroGS-Pg OpenGL (Dev) "; #else -char *libraryNameX = "ZeroGS Playground OpenGL "; +const char *libraryNameX = "ZeroGS Playground OpenGL "; #endif //------------------ Code diff --git a/plugins/zzogl-pg/opengl/ZZoglShaders.cpp b/plugins/zzogl-pg/opengl/ZZoglShaders.cpp index 2ca27a9873..cce839fab7 100644 --- a/plugins/zzogl-pg/opengl/ZZoglShaders.cpp +++ b/plugins/zzogl-pg/opengl/ZZoglShaders.cpp @@ -88,8 +88,8 @@ ZZshProgram g_vsprog = 0, g_psprog = 0; // 2 -- ZZ ZZshParameter g_vparamPosXY[2] = {0}, g_fparamFogColor = 0; //#ifdef DEVBUILD -extern char* EFFECT_NAME; // All this variables used for testing and set manually -extern char* EFFECT_DIR; +extern char EFFECT_NAME[256]; // All this variables used for testing and set manually +extern char EFFECT_DIR[256]; //#endif bool g_bCRTCBilinear = true; diff --git a/plugins/zzogl-pg/opengl/ZZoglShadersGLSL.cpp b/plugins/zzogl-pg/opengl/ZZoglShadersGLSL.cpp index c3eed11749..88a1a60dea 100644 --- a/plugins/zzogl-pg/opengl/ZZoglShadersGLSL.cpp +++ b/plugins/zzogl-pg/opengl/ZZoglShadersGLSL.cpp @@ -93,8 +93,8 @@ ZZshProgram ZZshMainProgram; char* ZZshSource; // Shader's source data. off_t ZZshSourceSize; -extern char* EFFECT_NAME; // All this variables used for testing and set manually -extern char* EFFECT_DIR; +extern char EFFECT_NAME[256]; // All this variables used for testing and set manually +extern char EFFECT_DIR[256]; bool g_bCRTCBilinear = true;