plugin API: use const char* insead of char*

I hope it doesn't change the ABI

v2: fix GSnull/zzogl/zerogs
v3: duplicated code on windows...
This commit is contained in:
Gregory Hainaut committed 2015-11-12 12:11:42 +01:00
1 parent 6180515212
commit abb4cb4810
9 files changed
+12 -12

No files matched your search

+2 -2
View File
@@ -241,7 +241,7 @@ extern "C" {
// basic funcs
s32 CALLBACK GSinit();
s32 CALLBACK GSopen(void *pDsp, char *Title, int multithread);
s32 CALLBACK GSopen(void *pDsp, const char *Title, int multithread);
void CALLBACK GSclose();
void CALLBACK GSshutdown();
void CALLBACK GSsetSettingsDir( const char* dir );
@@ -572,7 +572,7 @@ typedef void (CALLBACK* _PS2EsetEmuVersion)(const char* emuId, u32 version); //
// GS
// NOTE: GSreadFIFOX/GSwriteCSR functions CANNOT use XMM/MMX regs
// If you want to use them, need to save and restore current ones
typedef s32 (CALLBACK* _GSopen)(void *pDsp, char *Title, int multithread);
typedef s32 (CALLBACK* _GSopen)(void *pDsp, const char *Title, int multithread);
typedef s32 (CALLBACK* _GSopen2)( void *pDsp, u32 flags );
typedef void (CALLBACK* _GSvsync)(int field);
typedef void (CALLBACK* _GSgifTransfer)(const u32 *pMem, u32 size);
+3 -3
View File
@@ -179,7 +179,7 @@ EXPORT_C GSclose()
}
}
static int _GSopen(void** dsp, char* title, GSRendererType renderer, int threads = -1)
static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int threads = -1)
{
GSDevice* dev = NULL;
@@ -528,7 +528,7 @@ EXPORT_C_(int) GSopen2(void** dsp, uint32 flags)
}
stored_toggle_state = toggle_state;
int retval = _GSopen(dsp, NULL, renderer);
int retval = _GSopen(dsp, "", renderer);
if (s_gs != NULL)
s_gs->SetAspectRatio(0); // PCSX2 manages the aspect ratios
@@ -538,7 +538,7 @@ EXPORT_C_(int) GSopen2(void** dsp, uint32 flags)
return retval;
}
EXPORT_C_(int) GSopen(void** dsp, char* title, int mt)
EXPORT_C_(int) GSopen(void** dsp, const char* title, int mt)
{
/*
if(!XInitThreads()) return -1;
+1 -1
View File
@@ -121,7 +121,7 @@ EXPORT_C_(void) GSshutdown()
GSLog::Close();
}
EXPORT_C_(s32) GSopen(void *pDsp, char *Title, int multithread)
EXPORT_C_(s32) GSopen(void *pDsp, const char *Title, int multithread)
{
int err = 0;
GSLog::WriteLn("GS open.");
+1 -1
View File
@@ -20,7 +20,7 @@ Display *display;
int screen;
GtkScrolledWindow *win;
int GSOpenWindow(void *pDsp, char *Title)
int GSOpenWindow(void *pDsp, const char *Title)
{
display = XOpenDisplay(0);
screen = DefaultScreen(display);
+1 -1
View File
@@ -20,7 +20,7 @@
#include <X11/Xlib.h>
#include <X11/keysym.h>
extern int GSOpenWindow(void *pDsp, char *Title);
extern int GSOpenWindow(void *pDsp, const char *Title);
extern int GSOpenWindow2(void *pDsp, u32 flags);
extern void GSCloseWindow();
extern void GSProcessMessages();
+1 -1
View File
@@ -34,7 +34,7 @@ LRESULT CALLBACK MsgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return 0;
}
int GSOpenWindow(void *pDsp, char *Title)
int GSOpenWindow(void *pDsp, const char *Title)
{
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, MsgProc, 0L, 0L,
GetModuleHandle(NULL), NULL, NULL, NULL, NULL,
+1 -1
View File
@@ -18,7 +18,7 @@
#include <windows.h>
#include <windowsx.h>
extern int GSOpenWindow(void *pDsp, char *Title);
extern int GSOpenWindow(void *pDsp, const char *Title);
extern void GSCloseWindow();
extern void GSProcessMessages();
extern void HandleKeyEvent(keyEvent *ev);
+1 -1
View File
@@ -358,7 +358,7 @@ LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
return DefWindowProc( hWnd, msg, wParam, lParam );
}
s32 CALLBACK GSopen(void *pDsp, char *Title, int multithread) {
s32 CALLBACK GSopen(void *pDsp, const char *Title, int multithread) {
g_GSMultiThreaded = multithread;
+1 -1
View File
@@ -282,7 +282,7 @@ __forceinline void InitMisc()
ResetRegs();
}
EXPORT_C_(s32) GSopen(void *pDsp, char *Title, int multithread)
EXPORT_C_(s32) GSopen(void *pDsp, const char *Title, int multithread)
{
FUNCLOG