1 /* -*- Mode: C; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // -------------------------------------------------------------------------*/
13 #include "sjme/debug.h"
14 #include "3rdparty/libretro/libretro.h"
15 #include "frontend/libretro/shared.h"
17 static sjme_jboolean
sjme_libretro_danglingMessage(const char* fullMessage
,
18 const char* partMessage
)
20 struct retro_message retroMessage
;
21 struct retro_log_callback retroLogCallback
;
23 if (sjme_libretro_envCallback
!= NULL
)
26 retroMessage
.frames
= 240;
27 retroMessage
.msg
= partMessage
;
30 sjme_libretro_envCallback(RETRO_ENVIRONMENT_SET_MESSAGE
,
33 /* Is logging also available? */
34 memset(&retroLogCallback
, 0, sizeof(retroLogCallback
));
35 if (true == sjme_libretro_envCallback(
36 RETRO_ENVIRONMENT_GET_LOG_INTERFACE
, &retroLogCallback
) &&
37 retroLogCallback
.log
!= NULL
)
38 retroLogCallback
.log(RETRO_LOG_INFO
, "%s", fullMessage
);
40 /* We handled it here, so SquirrelJME does not have to print it. */
45 return SJME_JNI_FALSE
;
48 sjme_attrUnused RETRO_API
unsigned retro_api_version(void)
50 return RETRO_API_VERSION
;
53 sjme_attrUnused RETRO_API
void retro_deinit(void)
57 sjme_attrUnused RETRO_API
void retro_init(void)
59 sjme_danglingMessage
= sjme_libretro_danglingMessage
;
62 sjme_attrUnused RETRO_API
bool retro_load_game(
63 const struct retro_game_info
* game
)
65 /* If we requested no game then we do not really care do we? */
69 sjme_todo("Implement this?");
72 sjme_attrUnused RETRO_API
bool retro_load_game_special(unsigned game_type
,
73 const struct retro_game_info
*info
, size_t num_info
)
75 sjme_todo("Implement this?");
78 sjme_attrUnused RETRO_API
void retro_reset(void)
80 sjme_todo("Implement this?");
83 sjme_attrUnused RETRO_API
void retro_unload_game(void)
85 sjme_todo("Implement this?");