mirror of
https://github.com/libretro/neocd_libretro.git
synced 2025-03-01 12:26:05 +00:00
Add PSL1GHT compilation
This commit is contained in:
parent
04508fb0e3
commit
e51e82bdfb
10
Makefile
10
Makefile
@ -135,6 +135,16 @@ else ifeq ($(platform), ctr)
|
||||
AR = $(DEVKITARM)/bin/arm-none-eabi-ar$(EXE_EXT)
|
||||
CFLAGS += -D_3DS -DARM11 -march=armv6k -mtune=mpcore -mfloat-abi=hard -DSYNC_CDROM=1 -D_BSD_SOURCE
|
||||
CXXFLAGS += -D_3DS -DARM11 -march=armv6k -mtune=mpcore -mfloat-abi=hard -DSYNC_CDROM=1 -D_BSD_SOURCE
|
||||
# Lightweight PS3 Homebrew SDK
|
||||
else ifeq ($(platform), psl1ght)
|
||||
EXT=a
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT)
|
||||
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
|
||||
CXX = $(PS3DEV)/ppu/bin/ppu-g++$(EXE_EXT)
|
||||
CC_AS = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
|
||||
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
|
||||
CFLAGS += -D__CELLOS_LV2__ -D__PSL1GHT__ -mcpu=cell -D_XOPEN_SOURCE=500 -DSYNC_CDROM=1
|
||||
CXXFLAGS += -D__CELLOS_LV2__ -D__PSL1GHT__ -mcpu=cell -DDISABLE_AUDIO_THREAD=1 -D_XOPEN_SOURCE=500 -DSYNC_CDROM=1
|
||||
STATIC_LINKING = 1
|
||||
else
|
||||
CC = gcc
|
||||
|
@ -92,7 +92,7 @@ void Audio::initFrame()
|
||||
|
||||
void Audio::updateCurrentSample()
|
||||
{
|
||||
currentSample = static_cast<uint32_t>(std::round(static_cast<double>(Timer::CYCLES_PER_FRAME - std::max<int32_t>(0, neocd.remainingCyclesThisFrame)) * (samplesThisFrame - 1) / Timer::CYCLES_PER_FRAME));
|
||||
currentSample = static_cast<uint32_t>(0.5 + (static_cast<double>(Timer::CYCLES_PER_FRAME - std::max<int32_t>(0, neocd.remainingCyclesThisFrame)) * (samplesThisFrame - 1) / Timer::CYCLES_PER_FRAME));
|
||||
}
|
||||
|
||||
void Audio::finalize()
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <algorithm>
|
||||
#include <regex>
|
||||
#include <string.h>
|
||||
|
||||
#include "cdromtoc.h"
|
||||
#include "chdfile.h"
|
||||
@ -26,6 +27,18 @@ void CdromToc::clear()
|
||||
m_totalSectors = 0;
|
||||
}
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
namespace std
|
||||
{
|
||||
long stol (const std::string& str) {
|
||||
return strtol(str.c_str(), NULL, 10);
|
||||
}
|
||||
unsigned long stoul (const std::string& str) {
|
||||
return strtoul(str.c_str(), NULL, 10);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
bool CdromToc::loadCueSheet(const std::string &filename)
|
||||
{
|
||||
/*
|
||||
|
@ -12,9 +12,11 @@ extern const char* saveDirectory;
|
||||
|
||||
static void system_path_internal(char* buffer, size_t len)
|
||||
{
|
||||
if (path_is_empty(systemDirectory))
|
||||
snprintf(buffer, 3, ".%s", path_default_slash());
|
||||
else
|
||||
if (path_is_empty(systemDirectory)) {
|
||||
buffer[0] = '.';
|
||||
buffer[1] = path_default_slash_c();
|
||||
buffer[2] = '\0';
|
||||
} else
|
||||
strlcpy(buffer, systemDirectory, len);
|
||||
|
||||
if (!path_ends_with_slash(buffer))
|
||||
|
Loading…
x
Reference in New Issue
Block a user