diff --git a/SConstruct b/SConstruct index 56cf544b86..27399bdd5a 100644 --- a/SConstruct +++ b/SConstruct @@ -61,7 +61,8 @@ else: "Source/Core/DebuggerWX/src", "Source/Core/VideoCommon/Src", "Source/Plugins/Plugin_VideoOGL/Src", - "Source/Plugins/Plugin_DSP_NULL/Src", +# "Source/Plugins/Plugin_DSP_NULL/Src", + "Source/Plugins/Plugin_DSP_HLE/Src", # "Source/Plugins/Plugin_DSP_LLE/Src", "Source/Plugins/Plugin_PadSimple/Src", "Source/Plugins/Plugin_nJoy_SDL/Src", diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp index d11a9fbe18..bbcee7c9eb 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -26,7 +26,14 @@ // if you are on linux and this doesn't build, plz fix :) static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) -{ +{ + #ifdef __linux__ + __asm__("cpuid" + : "=a" (*eax), + "=b" (*ebx), + "=c" (*ecx), + "=d" (*edx)); + #else // Note: EBX is reserved on Mac OS X, so it has to be restored at the end // of the asm block. __asm__( @@ -38,6 +45,7 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, "=r" (*ebx), "=c" (*ecx), "=d" (*edx)); + #endif } void __cpuid(int info[4], int x) @@ -174,4 +182,4 @@ std::string CPUInfo::Summarize() if (bLongMode) sum += ", 64-bit support"; sum += " (wrong? report)"; return sum; -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/AOSoundStream.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/AOSoundStream.cpp index fb9171deb2..c6e959d368 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/AOSoundStream.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/AOSoundStream.cpp @@ -54,7 +54,7 @@ namespace AOSound } return(false);*/ - if(soundData[0] != 0) + //if(soundData[0] != 0) ao_play(device, soundData, dwSoundBytes); return true; diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/Mixer.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/Mixer.cpp index aad4154ea2..7aca16604e 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/Mixer.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/Mixer.cpp @@ -86,8 +86,10 @@ void Mixer_PushSamples(short *buffer, int num_stereo_samples, int sample_rate) { while (queue_size > queue_maxlength / 2) { #ifdef _WIN32 DSound::DSound_UpdateSound(); -#endif Sleep(0); +#else + sleep(0); +#endif } //convert into config option? diff --git a/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp b/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp index 06bbc42eb9..9f70979e50 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp @@ -602,10 +602,10 @@ void LoadBPReg(u32 value0) ((u32*)&bpmem)[opcode] = newval; TRectangle rc = { - (int)(bpmem.copyTexSrcXY.x), - (int)(bpmem.copyTexSrcXY.y), - (int)((bpmem.copyTexSrcXY.x+bpmem.copyTexSrcWH.x)), - (int)((bpmem.copyTexSrcXY.y+bpmem.copyTexSrcWH.y)) + (int)(bpmem.copyTexSrcXY.x * MValue), + (int)(bpmem.copyTexSrcXY.y * MValue), + (int)((bpmem.copyTexSrcXY.x * MValue + bpmem.copyTexSrcWH.x * MValue)), + (int)((bpmem.copyTexSrcXY.y * MValue + bpmem.copyTexSrcWH. * MValuey)) }; UPE_Copy PE_copy; @@ -633,7 +633,8 @@ void LoadBPReg(u32 value0) glViewport(0, 0, Renderer::GetTargetWidth(), Renderer::GetTargetHeight()); // if copied to texture, set the dimensions to the source copy dims, otherwise, clear the entire buffer if( PE_copy.copy_to_xfb == 0 ) - glScissor(rc.left, (Renderer::GetTargetHeight()-rc.bottom), (rc.right-rc.left), (rc.bottom-rc.top)); + glScissor(rc.left * MValue, (Renderer::GetTargetHeight()-rc.bottom * MValue), + (rc.right * MValue - rc.left * MValue), (rc.bottom * MValue-rc.top * MValue)); VertexShaderMngr::SetViewportChanged(); // since clear operations use the source rectangle, have to do regular renders (glClear clears the entire buffer) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp index f6e67cad80..bf856daff5 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp @@ -286,7 +286,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, GLX_DEPTH_SIZE, 24, - GLX_SAMPLE_BUFFERS_ARB, 1, GLX_SAMPLES_ARB, 1, None }; + GLX_SAMPLE_BUFFERS_ARB, g_Config.iMultisampleMode, GLX_SAMPLES_ARB, 1, None }; GLWin.dpy = XOpenDisplay(0); g_VideoInitialize.pWindowHandle = (HWND)GLWin.dpy; GLWin.screen = DefaultScreen(GLWin.dpy); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp index 9e160eebb6..31d73b4329 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp @@ -66,6 +66,8 @@ void Config::Load() iniFile.Get("Settings", "DumpTextures", &bDumpTextures, 0); iniFile.Get("Settings", "ShowShaderErrors", &bShowShaderErrors, 0); iniFile.Get("Settings", "Multisample", &iMultisampleMode, 0); + if(iMultisampleMode == 0) + iMultisampleMode = 1; std::string s; iniFile.Get("Settings", "TexDumpPath", &s, 0); if( s.size() < sizeof(texDumpPath) ) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index c86aaf9e2e..2babc39b31 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -18,7 +18,9 @@ #include "Globals.h" #include +#ifdef _WIN32 #include +#endif #include "GLInit.h" #include "Render.h" @@ -450,16 +452,13 @@ void Renderer::ReinitView(int nNewWidth, int nNewHeight) nBackbufferWidth = nNewWidth > 16 ? nNewWidth : 16; nBackbufferHeight = nNewHeight > 16 ? nNewHeight : 16; } -//TODO: Return correct Values int Renderer::GetTargetWidth() { - //return 640; return nBackbufferWidth; } int Renderer::GetTargetHeight() { - //return 480; return nBackbufferHeight; } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 54cd9d872d..297893b119 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -14,7 +14,7 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ - +#include #include "Globals.h" #ifdef _WIN32