mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
(iOS) Various:
Fix symbol conflict for audio_cb in CoreAudio driver and dummy lib Don't show a frame from the last loaded game when loading a new one Fix settings not being refreshed after a failed game load Fix issue that could cause the display time of the native pause button to be cut short
This commit is contained in:
parent
e25afd4a62
commit
c15463ad7c
@ -60,7 +60,7 @@ static void coreaudio_free(void *data)
|
|||||||
free(dev);
|
free(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static OSStatus audio_cb(void *userdata, AudioUnitRenderActionFlags *action_flags,
|
static OSStatus audio_write_cb(void *userdata, AudioUnitRenderActionFlags *action_flags,
|
||||||
const AudioTimeStamp *time_stamp, UInt32 bus_number,
|
const AudioTimeStamp *time_stamp, UInt32 bus_number,
|
||||||
UInt32 number_frames, AudioBufferList *io_data)
|
UInt32 number_frames, AudioBufferList *io_data)
|
||||||
{
|
{
|
||||||
@ -170,7 +170,7 @@ static void *coreaudio_init(const char *device, unsigned rate, unsigned latency)
|
|||||||
|
|
||||||
// Set callbacks and finish up
|
// Set callbacks and finish up
|
||||||
AURenderCallbackStruct cb = {0};
|
AURenderCallbackStruct cb = {0};
|
||||||
cb.inputProc = audio_cb;
|
cb.inputProc = audio_write_cb;
|
||||||
cb.inputProcRefCon = dev;
|
cb.inputProcRefCon = dev;
|
||||||
|
|
||||||
if (AudioUnitSetProperty(dev->dev, kAudioUnitProperty_SetRenderCallback,
|
if (AudioUnitSetProperty(dev->dev, kAudioUnitProperty_SetRenderCallback,
|
||||||
|
@ -85,6 +85,7 @@ void* rarch_main_ios(void* args)
|
|||||||
|
|
||||||
if (init_ret)
|
if (init_ret)
|
||||||
{
|
{
|
||||||
|
rarch_main_clear_state();
|
||||||
dispatch_async_f(dispatch_get_main_queue(), (void*)1, ios_rarch_exited);
|
dispatch_async_f(dispatch_get_main_queue(), (void*)1, ios_rarch_exited);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -132,6 +132,7 @@ bool ios_init_game_view()
|
|||||||
|
|
||||||
// Show pause button for a few seconds, so people know it's there
|
// Show pause button for a few seconds, so people know it's there
|
||||||
g_pause_indicator_view.alpha = 1.0f;
|
g_pause_indicator_view.alpha = 1.0f;
|
||||||
|
[NSObject cancelPreviousPerformRequestsWithTarget:g_instance];
|
||||||
[g_instance performSelector:@selector(hidePauseButton) withObject:g_instance afterDelay:3.0f];
|
[g_instance performSelector:@selector(hidePauseButton) withObject:g_instance afterDelay:3.0f];
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -143,6 +144,12 @@ bool ios_init_game_view()
|
|||||||
void ios_destroy_game_view()
|
void ios_destroy_game_view()
|
||||||
{
|
{
|
||||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||||
|
// Clear the view, otherwise the last frame form this game will be displayed
|
||||||
|
// briefly on the next game.
|
||||||
|
[g_view bindDrawable];
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
[g_view display];
|
||||||
|
|
||||||
glFinish();
|
glFinish();
|
||||||
|
|
||||||
g_view.context = nil;
|
g_view.context = nil;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user