spu2x: remove some definition (fix gcc-4.6)

gsdx: add a missing include (fix gcc-4.6). Force an init of sdl to allow in-emulation configuration


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4587 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut@gmail.com 2011-04-23 08:11:40 +00:00
parent 741b623b97
commit 5335c64f12
4 changed files with 15 additions and 1 deletions

View File

@ -346,6 +346,15 @@ bool GSWnd::Create(const string& title, int w, int h)
}
#ifdef _LINUX
// When you reconfigure the plugins during the play, SDL is shutdown so SDL_GetNumVideoDisplays return 0
// and the plugins is badly closed. NOTE: SDL is initialized in SDL_CreateWindow.
//
// I'm not sure this sanity check is still useful, normally (I hope) SDL_CreateWindow will return a null
// hence a false for this current function.
// For the moment do an init -- Gregory
if(!SDL_WasInit(SDL_INIT_VIDEO))
if(SDL_Init(SDL_INIT_VIDEO) < 0) return false;
// Sanity check; if there aren't any video displays available, we can't create a window.
if (SDL_GetNumVideoDisplays() <= 0) return false;
#endif

View File

@ -71,6 +71,7 @@
// stdc
#include <stddef.h>
#include <stdio.h>
#include <stdarg.h>
#include <math.h>

View File

@ -48,6 +48,9 @@ EXPORT_C_(void) SPU2dmaInterrupt(s32 channel);
// dma irq callbacks not needed anymore, they are handled by the dmac
EXPORT_C_(void) SPU2irqCallback(void (*SPU2callback)());
#else
// These defines are useless and gcc-4.6 complain about redefinition
// so we remove them on linux
#ifndef __LINUX__
EXPORT_C_(void) SPU2readDMA4Mem(u16 *pMem, u32 size);
EXPORT_C_(void) SPU2writeDMA4Mem(u16 *pMem, u32 size);
EXPORT_C_(void) SPU2interruptDMA4();
@ -61,6 +64,7 @@ EXPORT_C_(u32) SPU2ReadMemAddr(int core);
EXPORT_C_(void) SPU2WriteMemAddr(int core,u32 value);
EXPORT_C_(void) SPU2irqCallback(void (*SPU2callback)(),void (*DMA4callback)(),void (*DMA7callback)());
#endif
#endif
// extended funcs
// if start is 1, starts recording spu2 data, else stops

View File

@ -97,6 +97,7 @@ u32 pclocks;
u32 oldlimit;
#ifdef _MSC_VER
void dummy1()
{
}
@ -117,7 +118,6 @@ void dummy7()
#define Cread(a,b,c,d) if(fread(a,b,c,d)<b) break;
#ifdef _MSC_VER
#include "Windows/Dialogs.h"
EXPORT_C_(void) s2r_replay(HWND hwnd, HINSTANCE hinst, LPSTR filename, int nCmdShow)
{