From c1a321015a13cc69e6752ef4da038bfa682d3cbb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 7 Jun 2016 17:10:27 +0200 Subject: [PATCH] Create ui_companion_driver_get_application_ptr --- ui/ui_companion_driver.c | 8 ++++++++ ui/ui_companion_driver.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/ui/ui_companion_driver.c b/ui/ui_companion_driver.c index 1d2dc5cf9b..0df5dd85f5 100644 --- a/ui/ui_companion_driver.c +++ b/ui/ui_companion_driver.c @@ -177,3 +177,11 @@ const ui_window_t *ui_companion_driver_get_window_ptr(void) return NULL; return ui->window; } + +const ui_application_t *ui_companion_driver_get_application_ptr(void) +{ + const ui_companion_driver_t *ui = ui_companion_get_ptr(); + if (!ui) + return NULL; + return ui->application; +} diff --git a/ui/ui_companion_driver.h b/ui/ui_companion_driver.h index 4c0bcb5b71..131b01e0e4 100644 --- a/ui/ui_companion_driver.h +++ b/ui/ui_companion_driver.h @@ -122,6 +122,8 @@ void ui_companion_driver_free(void); const ui_window_t *ui_companion_driver_get_window_ptr(void); +const ui_application_t *ui_companion_driver_get_application_ptr(void); + RETRO_END_DECLS #endif