Mercurial > sdl-ios-xcode
comparison src/joystick/win32/SDL_mmjoystick.c @ 1135:cf6133247d34
Mac Classic and CodeWarrior patches.
--ryan.
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Subject: Re: [SDL] Updated Mac patch
Date: Tue, 6 Sep 2005 15:21:27 +0200
To: A list for developers using the SDL library <sdl@libsdl.org>
Earlier, I wrote:
> Updated the previous Mac patch to disable Carbon by default.
> Also "fixed" the SDL.spec again, so that it builds on Darwin.
>
> http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
> Also applied fine to SDL12 CVS, when I tried it.
>
> Haven't completed any new packaging or projects for Xcode/PB,
> but it seems to build and install fine here (in development).
Tested the new patch to build with old CodeWarrior and MPW,
and it seems it needed some hacks with those old headers...
Just in case you want to support the archeological versions -
here is a small add-on to the above patch, to fix those...
http://www.algonet.se/~afb/SDL-1.2.9-classic.patch
I couldn't get the old CW5 projects to build without a few
modifications - such as deleting the stray old header in:
"CWprojects/Support/Carbon/Include/ConditionalMacros.h" ?
But I updated both projects to CW6 too and built for Carbon,
and it ran all of the Mac test projects without any problems.
The MPW file seems to have compiled, with a small order change.
As long as you're still shipping the CWProjects and MPWmake
with the download, they should probably be updated/fixed ?
(another "solution" would of course be to just delete them)
I'll post my new projects along with the new Xcode projects
later on, along with XML exports of the various .mcp files.
(CW5 builds for Classic / "PPC", and CW6 builds for Carbon)
It'll be packaged as a part of the next SpriteWorld X release...
http://spriteworldx.sourceforge.net/ [Classic/Carbon/Win/X11]
--anders
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Thu, 08 Sep 2005 06:34:28 +0000 |
parents | fa2ce068b0b6 |
children | c9b51268668f |
comparison
equal
deleted
inserted
replaced
1134:55a86cfe6277 | 1135:cf6133247d34 |
---|---|
85 LONG regresult; | 85 LONG regresult; |
86 unsigned char regkey[256]; | 86 unsigned char regkey[256]; |
87 unsigned char regvalue[256]; | 87 unsigned char regvalue[256]; |
88 unsigned char regname[256]; | 88 unsigned char regname[256]; |
89 | 89 |
90 sprintf(regkey, "%s\\%s\\%s", | 90 sprintf((char *) regkey, "%s\\%s\\%s", |
91 REGSTR_PATH_JOYCONFIG, | 91 REGSTR_PATH_JOYCONFIG, |
92 szRegKey, | 92 szRegKey, |
93 REGSTR_KEY_JOYCURR); | 93 REGSTR_KEY_JOYCURR); |
94 regresult = RegOpenKeyExA(HKEY_LOCAL_MACHINE, | 94 regresult = RegOpenKeyExA(HKEY_LOCAL_MACHINE, |
95 (LPTSTR) ®key, 0, KEY_READ, &hKey); | 95 (LPTSTR) ®key, 0, KEY_READ, &hKey); |
98 /* | 98 /* |
99 find the registry key name for the | 99 find the registry key name for the |
100 joystick's properties | 100 joystick's properties |
101 */ | 101 */ |
102 regsize = sizeof(regname); | 102 regsize = sizeof(regname); |
103 sprintf(regvalue, | 103 sprintf((char *) regvalue, |
104 "Joystick%d%s", index+1, | 104 "Joystick%d%s", index+1, |
105 REGSTR_VAL_JOYOEMNAME); | 105 REGSTR_VAL_JOYOEMNAME); |
106 regresult = RegQueryValueExA(hKey, | 106 regresult = RegQueryValueExA(hKey, |
107 regvalue, 0, 0, (LPBYTE) ®name, | 107 (char *) regvalue, 0, 0, (LPBYTE) ®name, |
108 (LPDWORD) ®size); | 108 (LPDWORD) ®size); |
109 RegCloseKey(hKey); | 109 RegCloseKey(hKey); |
110 if (regresult == ERROR_SUCCESS) | 110 if (regresult == ERROR_SUCCESS) |
111 { | 111 { |
112 /* open that registry key */ | 112 /* open that registry key */ |
113 sprintf(regkey, "%s\\%s", | 113 sprintf((char *) regkey, "%s\\%s", |
114 REGSTR_PATH_JOYOEM, regname); | 114 REGSTR_PATH_JOYOEM, regname); |
115 regresult = RegOpenKeyExA(HKEY_LOCAL_MACHINE, | 115 regresult = RegOpenKeyExA(HKEY_LOCAL_MACHINE, |
116 regkey, 0, KEY_READ, &hKey); | 116 (char *) regkey, 0, KEY_READ, &hKey); |
117 if (regresult == ERROR_SUCCESS) | 117 if (regresult == ERROR_SUCCESS) |
118 { | 118 { |
119 /* find the size for the OEM name text */ | 119 /* find the size for the OEM name text */ |
120 regsize = sizeof(regvalue); | 120 regsize = sizeof(regvalue); |
121 regresult = | 121 regresult = |