mirror of
https://github.com/libretro/libretro-nuklear-soft.git
synced 2024-11-23 08:09:40 +00:00
rename app to gui
This commit is contained in:
parent
a1b782350c
commit
a6c0106afd
16
app.c
16
app.c
@ -56,7 +56,6 @@ struct nk_context *ctx;
|
||||
* and the corresponding function. */
|
||||
//#define NO_EXAMPLE
|
||||
|
||||
#include "style.c"
|
||||
|
||||
#if !defined(EXAMPLE_CANVAS) && !defined(NO_EXAMPLE)
|
||||
#include "node_editor.c"
|
||||
@ -64,7 +63,7 @@ struct nk_context *ctx;
|
||||
#include "overview.c"
|
||||
#endif
|
||||
|
||||
int app_init()
|
||||
int gui_init()
|
||||
{
|
||||
#ifdef M16B
|
||||
screen_surface=Retro_CreateRGBSurface16(rwidth,rheight,16,0,0,0,0);
|
||||
@ -85,7 +84,6 @@ int app_init()
|
||||
|
||||
/* style.c */
|
||||
/* THEME_BLACK THEME_WHITE THEME_RED THEME_BLUE THEME_DARK */
|
||||
set_style(ctx, THEME_DARK);
|
||||
|
||||
/* icons */
|
||||
|
||||
@ -98,7 +96,7 @@ int app_init()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int app_free()
|
||||
int gui_free()
|
||||
{
|
||||
//FIXME: memory leak here
|
||||
free(RSDL_font);
|
||||
@ -108,7 +106,7 @@ int app_free()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int app_event()
|
||||
int gui_event()
|
||||
{
|
||||
int evt;
|
||||
|
||||
@ -119,7 +117,7 @@ int app_event()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int app_main()
|
||||
int gui_main()
|
||||
{
|
||||
/* -------------- EXAMPLES ---------------- */
|
||||
/* uncomment here and corresponding header */
|
||||
@ -138,10 +136,10 @@ int app_main()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int app_frame()
|
||||
int gui_frame()
|
||||
{
|
||||
app_event();
|
||||
app_main();
|
||||
gui_event();
|
||||
gui_main();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
12
libretro.c
12
libretro.c
@ -27,20 +27,20 @@ static retro_environment_t environ_cb;
|
||||
retro_input_poll_t input_poll_cb;
|
||||
retro_input_state_t input_state_cb;
|
||||
|
||||
extern int app_init(void);
|
||||
extern int app_free(void);
|
||||
extern int app_frame(void);
|
||||
extern int gui_init(void);
|
||||
extern int gui_free(void);
|
||||
extern int gui_frame(void);
|
||||
|
||||
void context_reset(void)
|
||||
{
|
||||
fprintf(stderr, "Context reset!\n");
|
||||
app_init();
|
||||
gui_init();
|
||||
}
|
||||
|
||||
void context_destroy(void)
|
||||
{
|
||||
fprintf(stderr, "Context destroy!\n");
|
||||
app_free();
|
||||
gui_free();
|
||||
}
|
||||
|
||||
void retro_init(void)
|
||||
@ -202,7 +202,7 @@ void retro_run(void)
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE, &updated) && updated)
|
||||
update_variables();
|
||||
|
||||
app_frame();
|
||||
gui_frame();
|
||||
|
||||
frame_count++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user