Skip to content

Commit

Permalink
Merge branch 'libretro:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanvb authored Dec 19, 2022
2 parents 32210e5 + f5133d8 commit 8e332c2
Show file tree
Hide file tree
Showing 76 changed files with 1,944 additions and 11,198 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- D3D12: Added support for DRED (device remove extended data) (development aid - define DEVICE_DEBUG to use)
- D3D12: Made D3D12 viewport and scissors to behave more like Vulkan drivers (or be more correct)
- D3D12: Fixed validation error on start up due to buffers not being setup correctly for one frame
- D3D12: Fixed some shaders not appearing with the d3d12 driver - this reintroduces a validation error though but it seems to work as in not crash and is the old RA behaviour. Guess we need a different way of fixing the validation issue.
- DATABASE/EXPLORE/VIEW: Bugfix - RGUI did not clear thumbnail on non-playlist items such as Save and Delete
menu_explore_get_entry_playlist_index() returns -1 on invalid entries, but the variable where it was stored was unsigned
- DATABASE/EXPLORE/VIEW: Bugfix - XMB+Ozone cleared thumbnail in Quick Menu when navigating away from Run
Expand All @@ -34,6 +35,7 @@ menu_explore_get_entry_playlist_index() returns -1 on invalid entries, but the v
- LEAPFROG: Add Leapfrog (LFx000) Target
- LOCALIZATION: Updates
- LOCALIZATION/INPUT/IME/MENU/ONSCREEN KEYBOARD: Extended IME and Korean OSK
- MENU: Cleanup of help texts
- MENU: Allow toggling info off with the same button
- MENU: Allow menu wallpaper/background reset. Let's also remove the current wallpaper from the screen when pressing Start.
- MENU: Null driver shows with different color (Added for all menus the ability to show "disabled" items with a muted color)
Expand Down Expand Up @@ -61,6 +63,8 @@ menu_explore_get_entry_playlist_index() returns -1 on invalid entries, but the v
- MENU/UX/XMB: Optimized certain icon drawing loops (Main horizontal icons were looped even when not visible, and all previous "breadcrumb" icons were looped when only one certain was needed)
- MENU/UX/MATERIALUI: Fixed showing icons where there should not be any (Waitable Swapchains, Show Recording + Streaming)
- OSX/MACOS: Fixed Cocoa keyboard not allowing to map Analog stick
- PS2: Use the recently created ps2_drivers which makes easier the loading and init of all the drivers: Memory Card, USB, HDD, Audio, Controllers
- PS2: Adds exFat support for USB, and probably solves some unexpected issues when using an HDD driver for booting cores/games.
- SDL GFX: Fix no menu on start/blank screen issue.
- SRAM: Don't init SRAM saving without content (gets rid of the redundant logging)

Expand Down
23 changes: 2 additions & 21 deletions Makefile.ps2
Original file line number Diff line number Diff line change
Expand Up @@ -84,29 +84,15 @@ $(error "Please set PS2SDK in your environment. export PS2SDK=<path to>ps2sdk")
endif

INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
INCDIR += -Ips2/include -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
INCDIR += -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip

LDFLAGS += -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ports/lib -L.
# Lib cdvd is needed to get proper time
LIBS += -lpatches -lgskit -ldmakit -laudsrv -lmtap -lpadx -lz -lcdvd -lelf-loader -lfileXio -lpoweroff

LIBS += -lpatches -lgskit -ldmakit -lps2_drivers -lz -lelf-loader

CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) $(DEFINES) -DPS2 -ffast-math -fsingle-precision-constant
ASFLAGS = $(CFLAGS)

# IRX libs
IRX_FILES += sio2man.irx iomanX.irx fileXio.irx
IRX_FILES += mcman.irx mcserv.irx
IRX_FILES += usbd.irx bdm.irx bdmfs_vfat.irx usbmass_bd.irx
IRX_FILES += libsd.irx audsrv.irx
IRX_FILES += cdfs.irx
IRX_FILES += ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx poweroff.irx
IRX_FILES += mtapman.irx padman.irx
EE_OBJS += $(IRX_FILES:.irx=_irx.o)

# Missing objecst on the PS2SDK
EE_OBJS += ps2/compat_files/ps2_devices.o

EE_OBJS += $(OBJ)

EE_CFLAGS = $(CFLAGS)
Expand All @@ -118,7 +104,6 @@ EE_INCS = $(INCDIR)
EE_BIN = $(TARGET).elf
EE_GPVAL = $(GPVAL)


all: $(EE_BIN)

clean:
Expand All @@ -139,10 +124,6 @@ debug: clean all run
release: all
ps2-packer $(EE_BIN) $(TARGET_RELEASE)

# IRX files
%_irx.c:
$(PS2SDK)/bin/bin2c $(PS2SDK)/iop/irx/$*.irx $@ $*_irx

#Include preferences
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal_cpp
21 changes: 4 additions & 17 deletions Makefile.ps2.salamander
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ ifeq ($(MUTE_WARNINGS), 1)
endif

INCDIR = -Ilibretro-common/include
INCDIR += -Ips2/include
INCDIR += -I$(PS2SDK)/ports/include
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
ASFLAGS = $(CFLAGS)

RARCH_DEFINES += -DPS2 -DIS_SALAMANDER -DRARCH_CONSOLE

LIBDIR =
LDFLAGS =
LIBS = -lelf-loader -lpatches -lfileXio -lpoweroff
LDFLAGS += -L$(PS2SDK)/ports/lib
LIBS = -lelf-loader -lps2_drivers -lpatches

ifeq ($(SCREEN_DEBUG), 1)
LIBS += -ldebug
Expand Down Expand Up @@ -60,16 +60,7 @@ EE_OBJS = frontend/frontend_salamander.o \
libretro-common/vfs/vfs_implementation.o \
libretro-common/hash/lrc_hash.o \
libretro-common/time/rtime.o \
verbosity.o \
ps2/compat_files/ps2_devices.o

# IRX libs
IRX_FILES += sio2man.irx iomanX.irx fileXio.irx
IRX_FILES += mcman.irx mcserv.irx
IRX_FILES += usbd.irx bdm.irx bdmfs_vfat.irx usbmass_bd.irx
IRX_FILES += cdfs.irx
IRX_FILES += ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx poweroff.irx
EE_OBJS += $(IRX_FILES:.irx=_irx.o)
verbosity.o

EE_CFLAGS = $(CFLAGS)
EE_CXXFLAGS = $(CFLAGS)
Expand All @@ -93,10 +84,6 @@ run:
release: all
ps2-packer $(EE_BIN) $(TARGET_RELEASE)

# IRX files
%_irx.c:
$(PS2SDK)/bin/bin2c $(PS2SDK)/iop/irx/$*.irx $@ $*_irx

#Include preferences
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal_cpp
44 changes: 17 additions & 27 deletions audio/drivers/coreaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
#include <retro_endianness.h>
#include <string/stdstring.h>

#include <defines/cocoa_defines.h>

#include "../audio_driver.h"
#include "../../verbosity.h"
#include "defines/cocoa_defines.h"

typedef struct coreaudio
{
Expand Down Expand Up @@ -125,15 +126,14 @@ static OSStatus audio_write_cb(void *userdata,
#if TARGET_OS_IPHONE
static void coreaudio_interrupt_listener(void *data, UInt32 interrupt_state)
{
(void)data;
#if TARGET_OS_IOS
g_interrupted = (interrupt_state == kAudioSessionBeginInterruption);
#endif
}
#else
static void choose_output_device(coreaudio_t *dev, const char* device)
{
unsigned i;
int i;
UInt32 deviceCount;
AudioObjectPropertyAddress propaddr;
AudioDeviceID *devices = NULL;
Expand Down Expand Up @@ -203,7 +203,6 @@ static void *coreaudio_init(const char *device,
#endif
AURenderCallbackStruct cb = {0};
AudioStreamBasicDescription stream_desc = {0};
bool component_unavailable = false;
static bool session_initialized = false;
#if !HAS_MACOSX_10_12
ComponentDescription desc = {0};
Expand All @@ -215,9 +214,6 @@ static void *coreaudio_init(const char *device,
if (!dev)
return NULL;

(void)session_initialized;
(void)device;

dev->lock = slock_new();
dev->cond = scond_new();

Expand All @@ -231,30 +227,29 @@ static void *coreaudio_init(const char *device,
#endif

/* Create AudioComponent */
desc.componentType = kAudioUnitType_Output;
desc.componentType = kAudioUnitType_Output;
#if TARGET_OS_IPHONE
desc.componentSubType = kAudioUnitSubType_RemoteIO;
desc.componentSubType = kAudioUnitSubType_RemoteIO;
#else
desc.componentSubType = kAudioUnitSubType_HALOutput;
desc.componentSubType = kAudioUnitSubType_HALOutput;
#endif
desc.componentManufacturer = kAudioUnitManufacturer_Apple;

#if !HAS_MACOSX_10_12
comp = FindNextComponent(NULL, &desc);
if (!(comp = FindNextComponent(NULL, &desc)))
goto error;
#else
comp = AudioComponentFindNext(NULL, &desc);
#endif
if (!comp)
if (!(comp = AudioComponentFindNext(NULL, &desc)))
goto error;
#endif

#if !HAS_MACOSX_10_12
component_unavailable = (OpenAComponent(comp, &dev->dev) != noErr);
if ((OpenAComponent(comp, &dev->dev) != noErr))
goto error;
#else
component_unavailable = (AudioComponentInstanceNew(comp, &dev->dev) != noErr);
#endif

if (component_unavailable)
if ((AudioComponentInstanceNew(comp, &dev->dev) != noErr))
goto error;
#endif

#if !TARGET_OS_IPHONE
if (device)
Expand Down Expand Up @@ -307,7 +302,7 @@ static void *coreaudio_init(const char *device,
#endif

/* Set callbacks and finish up. */
cb.inputProc = audio_write_cb;
cb.inputProc = audio_write_cb;
cb.inputProcRefCon = dev;

if (AudioUnitSetProperty(dev->dev, kAudioUnitProperty_SetRenderCallback,
Expand All @@ -321,8 +316,7 @@ static void *coreaudio_init(const char *device,
fifo_size *= 2 * sizeof(float);
dev->buffer_size = fifo_size;

dev->buffer = fifo_new(fifo_size);
if (!dev->buffer)
if (!(dev->buffer = fifo_new(fifo_size)))
goto error;

RARCH_LOG("[CoreAudio]: Using buffer size of %u bytes: (latency = %u ms)\n",
Expand Down Expand Up @@ -417,11 +411,7 @@ static bool coreaudio_start(void *data, bool is_shutdown)
return dev->is_paused ? false : true;
}

static bool coreaudio_use_float(void *data)
{
(void)data;
return true;
}
static bool coreaudio_use_float(void *data) { return true; }

static size_t coreaudio_write_avail(void *data)
{
Expand Down
2 changes: 0 additions & 2 deletions audio/drivers/roar.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include <stdint.h>
#include <stdlib.h>

#include <errno.h>

#include <roaraudio.h>

#include <boolean.h>
Expand Down
6 changes: 3 additions & 3 deletions frontend/drivers/platform_ctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
#endif

#include "../frontend_driver.h"
#include "../../verbosity.h"
#include "../../file_path_special.h"
#include "../../defaults.h"
#include "../../paths.h"
#include "retroarch.h"
#include "file_path_special.h"
#include "../../retroarch.h"
#include "../../verbosity.h"

#include "ctr/ctr_debug.h"
#include "ctr/exec-3dsx/exec_3dsx.h"
Expand Down
9 changes: 0 additions & 9 deletions frontend/drivers/platform_darwin.m
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@
#include "../../ui/ui_companion_driver.h"
#include "../../paths.h"

#if 1
#define RELEASE_BUILD
#endif

typedef enum
{
CFApplicationDirectory = 1, /* Supported applications (Applications) */
Expand Down Expand Up @@ -438,7 +434,6 @@ static void frontend_darwin_get_env(int *argc, char *argv[],
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_REMAP], g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG], "remaps", sizeof(g_defaults.dirs[DEFAULT_DIR_REMAP]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS], application_data, "downloads", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT], application_data, "screenshots", sizeof(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT]));
#if defined(RELEASE_BUILD)
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER], application_data, "shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], application_data, "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], application_data, "info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
Expand All @@ -452,10 +447,6 @@ static void frontend_darwin_get_env(int *argc, char *argv[],
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], application_data, "cht", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER], application_data, "audio_filters", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER], application_data, "video_filters", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
#else
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER], home_dir_buf, "audio_filters", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER], home_dir_buf, "video_filters", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
#endif

#endif

Expand Down
3 changes: 2 additions & 1 deletion frontend/drivers/platform_dos.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
#include <stdio.h>
#include <time.h>
#include <process.h>

#include <string/stdstring.h>
#include <file/file_path.h>

#include "../frontend_driver.h"
#include "../../command.h"
#include "../../defaults.h"
#include "../../paths.h"
#include "../command.h"

static enum frontend_fork dos_fork_mode = FRONTEND_FORK_NONE;

Expand Down
8 changes: 4 additions & 4 deletions frontend/drivers/platform_emscripten.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
#include "../frontend.h"
#include "../frontend_driver.h"
#include "../../configuration.h"
#include "../../defaults.h"
#include "../../content.h"
#include "../../retroarch.h"
#include "../../verbosity.h"
#include "../../command.h"
#include "../../tasks/tasks_internal.h"
#include "../../defaults.h"
#include "../../file_path_special.h"
#include "../../paths.h"
#include "../../retroarch.h"
#include "../../verbosity.h"
#include "../../tasks/tasks_internal.h"

void dummyErrnoCodes(void);
void emscripten_mainloop(void);
Expand Down
Loading

0 comments on commit 8e332c2

Please sign in to comment.