Skip to content

Commit

Permalink
Updated cflags and libs for the latest vitasdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Northfear committed Dec 15, 2023
1 parent cffbb03 commit af0ede0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 28 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ endif()

if(VITA)
add_definitions(-DDUNELEGACY_DATADIR="ux0:data/dunelegacy")
set(VITA_FLAGS "-O3 -mcpu=cortex-a9 -mfpu=neon -fno-lto -DNDEBUG")
set(VITA_FLAGS "-O3 -mcpu=cortex-a9 -mfpu=neon -fno-lto -fno-optimize-sibling-calls -DNDEBUG")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VITA_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VITA_FLAGS}")
set(VITA_LIBS "-fno-builtin-memcpy -fno-builtin-memset -fno-builtin-memmove -fno-builtin-memcmp")
SET(CMAKE_CXX_STANDARD_LIBRARIES "${VITA_LIBS}")
endif()

add_subdirectory(src)
Expand Down
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,11 @@ if(VITA)
SDL2_mixer
SDL2_ttf
SDL2::SDL2
opusfile
opus
xmp
freetype
bz2
png
FLAC
mikmod
Expand All @@ -560,7 +564,6 @@ if(VITA)
vorbisfile
vorbis
ogg
freetype
pthread
z
)
Expand Down
28 changes: 4 additions & 24 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,6 @@
#include "vita/VitaInput.h"

int _newlib_heap_size_user = 224 * 1024 * 1024;

void *memcpy(void *destination, const void *source, size_t n)
{
return sceClibMemcpy(destination, source, n);
}

void *memset(void *destination, int c, size_t n)
{
return sceClibMemset(destination, c, n);
}

void *memmove(void *destination, const void *source, size_t n)
{
return sceClibMemmove(destination, source, n);
}

int memcmp(const void *arr1, const void *arr2, size_t n)
{
return sceClibMemcmp(arr1, arr2, n);
}
#endif

#if !defined(__GNUG__) || (defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) && (ATOMIC_INT_LOCK_FREE > 1) && !defined(_GLIBCXX_HAS_GTHREADS))
Expand Down Expand Up @@ -423,10 +403,10 @@ int main(int argc, char *argv[]) {
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
#ifdef __vita__
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
scePowerSetArmClockFrequency(444);
scePowerSetBusClockFrequency(222);
scePowerSetGpuClockFrequency(222);
scePowerSetGpuXbarClockFrequency(166);
scePowerSetArmClockFrequency(444);
scePowerSetBusClockFrequency(222);
scePowerSetGpuClockFrequency(222);
scePowerSetGpuXbarClockFrequency(166);
#endif

// global try/catch around everything
Expand Down

0 comments on commit af0ede0

Please sign in to comment.