mirror of https://github.com/PCSX2/pcsx2.git
gcc warning: constify const string
This commit is contained in:
parent
2816188c83
commit
22b65489e2
|
@ -21,7 +21,7 @@
|
|||
|
||||
struct GenericListViewColumn
|
||||
{
|
||||
wchar_t *name;
|
||||
const wchar_t *name;
|
||||
float size;
|
||||
int flags;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
/////////////////////
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue