mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
OpenCL: added opencl=true option to scons and fixed the case on the way.
Add ifdef for osx ocl include. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4348 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -33,12 +33,18 @@ namespace AudioCommon
|
|||||||
mixer = new CMixer();
|
mixer = new CMixer();
|
||||||
|
|
||||||
std::string backend = ac_Config.sBackend;
|
std::string backend = ac_Config.sBackend;
|
||||||
if (backend == BACKEND_COREAUDIO && CoreAudioSound::isValid()) soundStream = new CoreAudioSound(mixer);
|
if (backend == BACKEND_COREAUDIO && CoreAudioSound::isValid())
|
||||||
if (backend == BACKEND_DIRECTSOUND && DSound::isValid()) soundStream = new DSound(mixer, g_dspInitialize.hWnd);
|
soundStream = new CoreAudioSound(mixer);
|
||||||
if (backend == BACKEND_AOSOUND && AOSound::isValid()) soundStream = new AOSound(mixer);
|
if (backend == BACKEND_DIRECTSOUND && DSound::isValid())
|
||||||
if (backend == BACKEND_OPENAL && OpenALStream::isValid()) soundStream = new OpenALStream(mixer);
|
soundStream = new DSound(mixer, g_dspInitialize.hWnd);
|
||||||
if (backend == BACKEND_ALSA && AlsaSound::isValid()) soundStream = new AlsaSound(mixer);
|
if (backend == BACKEND_AOSOUND && AOSound::isValid())
|
||||||
if (backend == BACKEND_NULL && NullSound::isValid()) soundStream = new NullSound(mixer);
|
soundStream = new AOSound(mixer);
|
||||||
|
if (backend == BACKEND_OPENAL && OpenALStream::isValid())
|
||||||
|
soundStream = new OpenALStream(mixer);
|
||||||
|
if (backend == BACKEND_ALSA && AlsaSound::isValid())
|
||||||
|
soundStream = new AlsaSound(mixer);
|
||||||
|
if (backend == BACKEND_NULL && NullSound::isValid())
|
||||||
|
soundStream = new NullSound(mixer);
|
||||||
|
|
||||||
if (soundStream != NULL)
|
if (soundStream != NULL)
|
||||||
{
|
{
|
||||||
@ -85,12 +91,18 @@ namespace AudioCommon
|
|||||||
{
|
{
|
||||||
std::vector<std::string> backends;
|
std::vector<std::string> backends;
|
||||||
|
|
||||||
if (CoreAudioSound::isValid()) backends.push_back(BACKEND_COREAUDIO);
|
if (CoreAudioSound::isValid())
|
||||||
if (DSound::isValid()) backends.push_back(BACKEND_DIRECTSOUND);
|
backends.push_back(BACKEND_COREAUDIO);
|
||||||
if (AOSound::isValid()) backends.push_back(BACKEND_AOSOUND);
|
if (DSound::isValid())
|
||||||
if (OpenALStream::isValid()) backends.push_back(BACKEND_OPENAL);
|
backends.push_back(BACKEND_DIRECTSOUND);
|
||||||
if (AlsaSound::isValid()) backends.push_back(BACKEND_ALSA);
|
if (AOSound::isValid())
|
||||||
if (NullSound::isValid()) backends.push_back(BACKEND_NULL);
|
backends.push_back(BACKEND_AOSOUND);
|
||||||
|
if (OpenALStream::isValid())
|
||||||
|
backends.push_back(BACKEND_OPENAL);
|
||||||
|
if (AlsaSound::isValid())
|
||||||
|
backends.push_back(BACKEND_ALSA);
|
||||||
|
if (NullSound::isValid())
|
||||||
|
backends.push_back(BACKEND_NULL);
|
||||||
|
|
||||||
return backends;
|
return backends;
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t index = 0;
|
size_t index = 0;
|
||||||
for (index; index < m_Entries.size() - 1; index++)
|
for (; index < m_Entries.size() - 1; index++)
|
||||||
{
|
{
|
||||||
if (strcmp(m_Entries.at(index).name, sectionName) == 0)
|
if (strcmp(m_Entries.at(index).name, sectionName) == 0)
|
||||||
break;
|
break;
|
||||||
@ -99,7 +99,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
size_t index = 0;
|
size_t index = 0;
|
||||||
for (index; index < m_Entries.size() - 1; index++)
|
for (; index < m_Entries.size() - 1; index++)
|
||||||
{
|
{
|
||||||
if (strcmp(m_Entries.at(index).name, sectionName) == 0)
|
if (strcmp(m_Entries.at(index).name, sectionName) == 0)
|
||||||
break;
|
break;
|
||||||
|
@ -16,7 +16,12 @@
|
|||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
#include "TextureDecoder.h"
|
#include "TextureDecoder.h"
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <OpenCL/opencl.h>
|
||||||
|
#else
|
||||||
#include <CL/cl.h>
|
#include <CL/cl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -13,7 +13,6 @@ files = [
|
|||||||
'memcpy_amd.cpp',
|
'memcpy_amd.cpp',
|
||||||
'OpcodeDecoding.cpp',
|
'OpcodeDecoding.cpp',
|
||||||
'TextureDecoder.cpp',
|
'TextureDecoder.cpp',
|
||||||
# 'OpenCL/TextureDecoder.cpp',
|
|
||||||
'XFMemory.cpp',
|
'XFMemory.cpp',
|
||||||
'XFBConvert.cpp',
|
'XFBConvert.cpp',
|
||||||
'IndexGenerator.cpp',
|
'IndexGenerator.cpp',
|
||||||
@ -37,6 +36,13 @@ files = [
|
|||||||
'HiresTextures.cpp',
|
'HiresTextures.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
env_common = env.Clone()
|
|
||||||
env_common.Append(CXXFLAGS = [ '-fPIC' ])
|
env_vcommon = env.Clone()
|
||||||
env_common.StaticLibrary(env['local_libs'] + "videocommon", files)
|
|
||||||
|
if env_vcommon['HAVE_OPENCL']:
|
||||||
|
files += [
|
||||||
|
'OpenCL/TextureDecoder.cpp',
|
||||||
|
]
|
||||||
|
|
||||||
|
env_vcommon.Append(CXXFLAGS = [ '-fPIC' ])
|
||||||
|
env_vcommon.StaticLibrary(env['local_libs'] + "videocommon", files)
|
||||||
|
Reference in New Issue
Block a user