Skip to content

Commit

Permalink
Disable DAEDALUS_SDL for PSP
Browse files Browse the repository at this point in the history
  • Loading branch information
howard0su committed Dec 11, 2023
1 parent b903b06 commit daec412
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ endif()
option(DAEDALUS_PSP_USE_ME "Use the Media Engine" ON)
option(DAEDALUS_PSP_USE_VFPU "Enable VFPU Instructions" ON)
option(DAEDALUS_SIM_DOUBLES "Simulate Doubles" ON)
option(DAEDALUS_SDL "Enable SDL" ON)
option(DAEDALUS_SDL "Enable SDL" OFF)
elseif(UNIX)
option(DAEDALUS_SDL "SDL Build" ON)
option(DAEDALUS_ENABLE_DYNAREC "Enable Dynamic Recompilation, Disable if system not supported" OFF)
Expand Down
11 changes: 7 additions & 4 deletions Source/SysPSP/HLEAudio/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
add_library(HLEAudio_PSP OBJECT
# ${PROJECT_SOURCE_DIR}/Source/SysPosix/HLEAudio/AudioPluginSDL.cpp
AudioPluginPSP_SDL.cpp
)
if(DAEDALUS_SDL)
SET(SRC AudioPluginPSP_SDL.cpp)
else(DAEDALUS_SDL)
SET(SRC AudioPluginPSP.cpp)
endif(DAEDALUS_SDL)

add_library(HLEAudio_PSP OBJECT ${SRC})

list(APPEND daed_libs "HLEAudio_PSP")
set(daed_libs ${daed_libs} PARENT_SCOPE)
Expand Down
4 changes: 3 additions & 1 deletion Source/SysPSP/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,13 @@ static bool Initialize()
sceCtrlSetSamplingCycle(0);
sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);

if( SDL_Init( SDL_INIT_AUDIO ) < 0 )
#ifdef DAEDALUS_SDL
if( SDL_Init( SDL_INIT_AUDIO ) < 0 )
{
printf( "SDL could not initialize! SDL Error: %s\n", SDL_GetError() );
return false;
}
#endif

// Detect PSP greater than PSP 1000
if ( kuKernelGetModel() > 0 )
Expand Down

0 comments on commit daec412

Please sign in to comment.