shithub: choc

Download patch

ref: 917aa5b184fdfc03a80ce46fb857c3a2780dc705
parent: f0f56055d87e51f7ab974cd7812de72ce1cd9100
author: Simon Howard <[email protected]>
date: Tue Mar 26 22:25:20 EDT 2013

Remove duplicate definition of M_OEMToUTF8() (thanks exp(x)).

Subversion-branch: /branches/v2-branch
Subversion-revision: 2569

--- a/src/setup/multiplayer.c
+++ b/src/setup/multiplayer.c
@@ -30,6 +30,7 @@
 
 #include "d_iwad.h"
 #include "m_config.h"
+#include "m_misc.h"
 #include "doom/d_englsh.h"
 #include "m_controls.h"
 
@@ -1007,28 +1008,6 @@
         }
     }
 }
-
-#ifdef _WIN32
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-char *M_OEMToUTF8(const char *oem)
-{
-    unsigned int len = strlen(oem) + 1;
-    wchar_t *tmp;
-    char *result;
-
-    tmp = malloc(len * sizeof(wchar_t));
-    MultiByteToWideChar(CP_OEMCP, 0, oem, len, tmp, len);
-    result = malloc(len * 4);
-    WideCharToMultiByte(CP_UTF8, 0, tmp, len, result, len * 4, NULL, NULL);
-    free(tmp);
-
-    return result;
-}
-
-#endif
 
 void SetPlayerNameDefault(void)
 {