(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:
meancoot 2013-04-18 20:18:29 -04:00
parent e25afd4a62
commit c15463ad7c
3 changed files with 10 additions and 2 deletions

View File

@ -60,7 +60,7 @@ static void coreaudio_free(void *data)
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,
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
AURenderCallbackStruct cb = {0};
cb.inputProc = audio_cb;
cb.inputProc = audio_write_cb;
cb.inputProcRefCon = dev;
if (AudioUnitSetProperty(dev->dev, kAudioUnitProperty_SetRenderCallback,

View File

@ -85,6 +85,7 @@ void* rarch_main_ios(void* args)
if (init_ret)
{
rarch_main_clear_state();
dispatch_async_f(dispatch_get_main_queue(), (void*)1, ios_rarch_exited);
return 0;
}

View File

@ -132,6 +132,7 @@ bool ios_init_game_view()
// Show pause button for a few seconds, so people know it's there
g_pause_indicator_view.alpha = 1.0f;
[NSObject cancelPreviousPerformRequestsWithTarget:g_instance];
[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()
{
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();
g_view.context = nil;