This commit is contained in:
twinaphex 2015-07-02 18:39:57 +02:00
parent 8ff571b7bd
commit cedcae78d4
5 changed files with 17 additions and 12 deletions

View File

@ -83,20 +83,14 @@
#define TERM_STR "\n"
#define RETRO_MSG_MOVIE_STARTED_INIT_NETPLAY_FAILED "Movie playback has started. Cannot start netplay."
#define RETRO_MSG_INIT_NETPLAY_FAILED "Failed to initialize netplay."
#define RETRO_MSG_INIT_AUTOSAVE_FAILED "Could not initialize autosave."
#define RETRO_MSG_MOVIE_RECORD_STOPPING "Stopping movie record."
#define RETRO_MSG_MOVIE_PLAYBACK_ENDED "Movie playback ended."
#define RETRO_MSG_LIBRETRO_ABI_BREAK RETRO_FRONTEND " is compiled against a different version of libretro than this libretro implementation."
#define RETRO_LOG_MOVIE_STARTED_INIT_NETPLAY_FAILED RETRO_MSG_MOVIE_STARTED_INIT_NETPLAY_FAILED TERM_STR
#define RETRO_LOG_INIT_NETPLAY_FAILED RETRO_MSG_INIT_NETPLAY_FAILED TERM_STR
#define RETRO_LOG_INIT_AUTOSAVE_FAILED RETRO_MSG_INIT_AUTOSAVE_FAILED TERM_STR
#define RETRO_LOG_REWINDING RETRO_MSG_REWINDING TERM_STR
#define RETRO_LOG_REWIND_REACHED_END RETRO_MSG_REWIND_REACHED_END TERM_STR
#define RETRO_LOG_MOVIE_RECORD_STOPPING RETRO_MSG_MOVIE_RECORD_STOPPING TERM_STR
#define RETRO_LOG_MOVIE_PLAYBACK_ENDED RETRO_MSG_MOVIE_PLAYBACK_ENDED TERM_STR
#define RETRO_LOG_LIBRETRO_ABI_BREAK RETRO_MSG_LIBRETRO_ABI_BREAK RETRO_FRONTEND TERM_STR
#endif

View File

@ -20,6 +20,12 @@ const char *msg_hash_to_str_us(uint32_t hash)
{
switch (hash)
{
case MSG_NETPLAY_FAILED_MOVIE_PLAYBACK_HAS_STARTED:
return "Movie playback has started. Cannot start netplay.";
case MSG_NETPLAY_FAILED:
return "Failed to initialize netplay.";
case MSG_LIBRETRO_ABI_BREAK:
return "is compiled against a different version of libretro than this libretro implementation.";
case MSG_REWIND_INIT_FAILED_NO_SAVESTATES:
return "Implementation does not support save states. Cannot use rewind.";
case MSG_REWIND_INIT_FAILED_THREADED_AUDIO:

View File

@ -36,6 +36,11 @@
#define MSG_REWIND_INIT_FAILED_THREADED_AUDIO 0x359001b6U
#define MSG_REWIND_INIT_FAILED_NO_SAVESTATES 0x979b9cc3U
#define MSG_LIBRETRO_ABI_BREAK 0xf02cccd7U
#define MSG_NETPLAY_FAILED 0x61ee3426U
#define MSG_NETPLAY_FAILED_MOVIE_PLAYBACK_HAS_STARTED 0xb1e5dbfcU
#define MSG_DETECTED_VIEWPORT_OF 0xdf7002baU
#define MSG_RECORDING_TO 0x189fd324U
#define MSG_HW_RENDERED_MUST_USE_POSTSHADED_RECORDING 0x7f9f7659U

View File

@ -25,7 +25,7 @@
#include "general.h"
#include "autosave.h"
#include "dynamic.h"
#include "intl/intl.h"
#include "msg_hash.h"
#include "system.h"
struct delta_frame
@ -1660,7 +1660,7 @@ bool init_netplay(void)
if (global->bsv.movie_start_playback)
{
RARCH_WARN(RETRO_LOG_MOVIE_STARTED_INIT_NETPLAY_FAILED);
RARCH_WARN("%s\n", msg_hash_to_str(MSG_NETPLAY_FAILED_MOVIE_PLAYBACK_HAS_STARTED));
return false;
}
@ -1684,10 +1684,10 @@ bool init_netplay(void)
return true;
global->netplay_is_client = false;
RARCH_WARN(RETRO_LOG_INIT_NETPLAY_FAILED);
RARCH_WARN("%s\n", msg_hash_to_str(MSG_NETPLAY_FAILED));
rarch_main_msg_queue_push(
RETRO_MSG_INIT_NETPLAY_FAILED,
rarch_main_msg_queue_push_new(
MSG_NETPLAY_FAILED_MOVIE_PLAYBACK_HAS_STARTED,
0, 180, false);
return false;
}

View File

@ -1109,7 +1109,7 @@ void rarch_verify_api_version(void)
RARCH_LOG("Compiled against API: %u\n", RETRO_API_VERSION);
if (pretro_api_version() != RETRO_API_VERSION)
RARCH_WARN(RETRO_LOG_LIBRETRO_ABI_BREAK);
RARCH_WARN("%s\n", msg_hash_to_str(MSG_LIBRETRO_ABI_BREAK));
}
#define FAIL_CPU(simd_type) do { \