comparison src/video/wincommon/SDL_sysevents.c @ 1336:3692456e7b0f

Use SDL_ prefixed versions of C library functions. FIXME: Change #include <stdlib.h> to #include "SDL_stdlib.h" Change #include <string.h> to #include "SDL_string.h" Make sure nothing else broke because of this...
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 06:59:48 +0000
parents 450721ad5436
children 604d73db6802
comparison
equal deleted inserted replaced
1335:c39265384763 1336:3692456e7b0f
704 } 704 }
705 705
706 if ( name ) { 706 if ( name ) {
707 #ifdef _WIN32_WCE 707 #ifdef _WIN32_WCE
708 /* WinCE uses the UNICODE version */ 708 /* WinCE uses the UNICODE version */
709 int nLen = strlen(name)+1; 709 int nLen = SDL_strlen(name)+1;
710 SDL_Appname = malloc(nLen*2); 710 SDL_Appname = SDL_malloc(nLen*2);
711 MultiByteToWideChar(CP_ACP, 0, name, -1, SDL_Appname, nLen); 711 MultiByteToWideChar(CP_ACP, 0, name, -1, SDL_Appname, nLen);
712 #else 712 #else
713 int nLen = strlen(name)+1; 713 int nLen = SDL_strlen(name)+1;
714 SDL_Appname = malloc(nLen); 714 SDL_Appname = SDL_malloc(nLen);
715 strcpy(SDL_Appname, name); 715 SDL_strcpy(SDL_Appname, name);
716 #endif /* _WIN32_WCE */ 716 #endif /* _WIN32_WCE */
717 SDL_Appstyle = style; 717 SDL_Appstyle = style;
718 SDL_Instance = hInst ? hInst : SDL_GetModuleHandle(); 718 SDL_Instance = hInst ? hInst : SDL_GetModuleHandle();
719 } 719 }
720 720
781 781
782 static int Is9xME() 782 static int Is9xME()
783 { 783 {
784 OSVERSIONINFO info; 784 OSVERSIONINFO info;
785 785
786 memset(&info, 0, sizeof(info)); 786 SDL_memset(&info, 0, sizeof(info));
787 info.dwOSVersionInfoSize = sizeof(info); 787 info.dwOSVersionInfoSize = sizeof(info);
788 if (!GetVersionEx(&info)) { 788 if (!GetVersionEx(&info)) {
789 return 0; 789 return 0;
790 } 790 }
791 return (info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS); 791 return (info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);
796 char buff[8]; 796 char buff[8];
797 int lcid = MAKELCID(LOWORD(GetKeyboardLayout(0)), SORT_DEFAULT); 797 int lcid = MAKELCID(LOWORD(GetKeyboardLayout(0)), SORT_DEFAULT);
798 int cp = GetACP(); 798 int cp = GetACP();
799 799
800 if (GetLocaleInfo(lcid, LOCALE_IDEFAULTANSICODEPAGE, buff, sizeof(buff))) { 800 if (GetLocaleInfo(lcid, LOCALE_IDEFAULTANSICODEPAGE, buff, sizeof(buff))) {
801 cp = strtol(buff, NULL, 0); 801 cp = SDL_strtol(buff, NULL, 0);
802 } 802 }
803 return cp; 803 return cp;
804 } 804 }
805 805
806 static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, PBYTE keystate, LPWSTR wchars, int wsize, UINT flags) 806 static int WINAPI ToUnicode9xME(UINT vkey, UINT scancode, PBYTE keystate, LPWSTR wchars, int wsize, UINT flags)