From cedcae78d41ce0f9886f04e9d730b71d6e0b1407 Mon Sep 17 00:00:00 2001
From: twinaphex <libretro@gmail.com>
Date: Thu, 2 Jul 2015 18:39:57 +0200
Subject: [PATCH] Updates

---
 intl/english.h     |  6 ------
 intl/msg_hash_us.c |  6 ++++++
 msg_hash.h         |  5 +++++
 netplay.c          | 10 +++++-----
 retroarch.c        |  2 +-
 5 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/intl/english.h b/intl/english.h
index 54409cf1d0..e95c34991a 100644
--- a/intl/english.h
+++ b/intl/english.h
@@ -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
diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c
index c1bca7c3e5..211bc88dbe 100644
--- a/intl/msg_hash_us.c
+++ b/intl/msg_hash_us.c
@@ -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:
diff --git a/msg_hash.h b/msg_hash.h
index 9ae33040c0..a7c8fea85c 100644
--- a/msg_hash.h
+++ b/msg_hash.h
@@ -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
diff --git a/netplay.c b/netplay.c
index 23e86946b1..114f332a3b 100644
--- a/netplay.c
+++ b/netplay.c
@@ -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;
 }
diff --git a/retroarch.c b/retroarch.c
index d96862f886..eb1054b84e 100644
--- a/retroarch.c
+++ b/retroarch.c
@@ -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 { \