shithub: choc

Download patch

ref: 52c831999bddb7b68b855d0fec644240863cbee2
parent: 2df46868ae68060f3eb681a5dd1943ee522a88b4
author: Simon Howard <[email protected]>
date: Sat Jun 6 21:27:30 EDT 2009

Use GetUserNameExW, not GetUserName (doesn't exist on WinCE)

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1556

--- a/wince/env.c
+++ b/wince/env.c
@@ -9,6 +9,7 @@
 
 #include <windows.h>
 #include <lmcons.h>
+#include <secext.h>
 #include <shlobj.h>
 
 #include "env.h"
@@ -35,7 +36,7 @@
     // Username:
 
     buf_len = UNLEN;
-    GetUserNameW(temp, &buf_len);
+    GetUserNameExW(NameDisplay, temp, &buf_len);
     WCharToChar(temp, temp_buf, MAX_PATH);
 
     // Temp dir: