Fixes for compiling with Visual C++ 8.0 Express Edition
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402369
This commit is contained in:
parent
80dcd123dc
commit
ed60e3a7d4
8 changed files with 12 additions and 13 deletions
BIN
VisualC.zip
BIN
VisualC.zip
Binary file not shown.
|
@ -243,7 +243,7 @@ SDL_CompatEventFilter(void *userdata, SDL_Event * event)
|
||||||
case SDL_TEXTINPUT:
|
case SDL_TEXTINPUT:
|
||||||
{
|
{
|
||||||
/* FIXME: Generate an old style key repeat event if needed */
|
/* FIXME: Generate an old style key repeat event if needed */
|
||||||
printf("TEXTINPUT: '%s'\n", event->text.text);
|
//printf("TEXTINPUT: '%s'\n", event->text.text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SDL_MOUSEWHEEL:
|
case SDL_MOUSEWHEEL:
|
||||||
|
|
|
@ -555,7 +555,7 @@ prepare_audiospec(const SDL_AudioSpec * orig, SDL_AudioSpec * prepared)
|
||||||
switch (orig->channels) {
|
switch (orig->channels) {
|
||||||
case 0:{
|
case 0:{
|
||||||
const char *env = SDL_getenv("SDL_AUDIO_CHANNELS");
|
const char *env = SDL_getenv("SDL_AUDIO_CHANNELS");
|
||||||
if ((!env) || ((prepared->channels = SDL_atoi(env)) == 0)) {
|
if ((!env) || ((prepared->channels = (Uint8)SDL_atoi(env)) == 0)) {
|
||||||
prepared->channels = 2; /* a reasonable default */
|
prepared->channels = 2; /* a reasonable default */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1177,7 +1177,9 @@ SDL_RateSLOW(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||||
case 32:
|
case 32:
|
||||||
{
|
{
|
||||||
/* !!! FIXME: need 32-bit converter here! */
|
/* !!! FIXME: need 32-bit converter here! */
|
||||||
|
#ifdef DEBUG_CONVERT
|
||||||
fprintf(stderr, "FIXME: need 32-bit converter here!\n");
|
fprintf(stderr, "FIXME: need 32-bit converter here!\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1214,7 +1216,9 @@ SDL_RateSLOW(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||||
case 32:
|
case 32:
|
||||||
{
|
{
|
||||||
/* !!! FIXME: need 32-bit converter here! */
|
/* !!! FIXME: need 32-bit converter here! */
|
||||||
|
#ifdef DEBUG_CONVERT
|
||||||
fprintf(stderr, "FIXME: need 32-bit converter here!\n");
|
fprintf(stderr, "FIXME: need 32-bit converter here!\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -303,8 +303,8 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||||
float src1, src2;
|
float src1, src2;
|
||||||
double dst_sample;
|
double dst_sample;
|
||||||
/* !!! FIXME: are these right? */
|
/* !!! FIXME: are these right? */
|
||||||
const double max_audioval = 3.40282347e+38F;
|
const double max_audioval = 3.402823466e+38F;
|
||||||
const double min_audioval = -3.40282347e+38F;
|
const double min_audioval = -3.402823466e+38F;
|
||||||
|
|
||||||
len /= 4;
|
len /= 4;
|
||||||
while (len--) {
|
while (len--) {
|
||||||
|
@ -332,8 +332,8 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||||
float src1, src2;
|
float src1, src2;
|
||||||
double dst_sample;
|
double dst_sample;
|
||||||
/* !!! FIXME: are these right? */
|
/* !!! FIXME: are these right? */
|
||||||
const double max_audioval = 3.40282347e+38F;
|
const double max_audioval = 3.402823466e+38F;
|
||||||
const double min_audioval = -3.40282347e+38F;
|
const double min_audioval = -3.402823466e+38F;
|
||||||
|
|
||||||
len /= 4;
|
len /= 4;
|
||||||
while (len--) {
|
while (len--) {
|
||||||
|
|
|
@ -347,7 +347,6 @@ SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
||||||
if (SDL_ISPIXELFORMAT_FOURCC(texture->format)) {
|
if (SDL_ISPIXELFORMAT_FOURCC(texture->format)) {
|
||||||
texture->driverdata = SDL_SW_CreateYUVTexture(texture);
|
texture->driverdata = SDL_SW_CreateYUVTexture(texture);
|
||||||
} else {
|
} else {
|
||||||
SDL_Surface *surface;
|
|
||||||
int bpp;
|
int bpp;
|
||||||
Uint32 Rmask, Gmask, Bmask, Amask;
|
Uint32 Rmask, Gmask, Bmask, Amask;
|
||||||
|
|
||||||
|
|
|
@ -939,7 +939,6 @@ void
|
||||||
SDL_SetWindowTitle(SDL_WindowID windowID, const char *title)
|
SDL_SetWindowTitle(SDL_WindowID windowID, const char *title)
|
||||||
{
|
{
|
||||||
SDL_Window *window = SDL_GetWindowFromID(windowID);
|
SDL_Window *window = SDL_GetWindowFromID(windowID);
|
||||||
const char *last_title;
|
|
||||||
|
|
||||||
if (!window || title == window->title) {
|
if (!window || title == window->title) {
|
||||||
return;
|
return;
|
||||||
|
@ -1852,7 +1851,6 @@ int
|
||||||
SDL_GetTextureAlphaMod(SDL_TextureID textureID, Uint8 * alpha)
|
SDL_GetTextureAlphaMod(SDL_TextureID textureID, Uint8 * alpha)
|
||||||
{
|
{
|
||||||
SDL_Texture *texture = SDL_GetTextureFromID(textureID);
|
SDL_Texture *texture = SDL_GetTextureFromID(textureID);
|
||||||
SDL_Renderer *renderer;
|
|
||||||
|
|
||||||
if (!texture) {
|
if (!texture) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1886,7 +1884,6 @@ int
|
||||||
SDL_GetTextureBlendMode(SDL_TextureID textureID, int *blendMode)
|
SDL_GetTextureBlendMode(SDL_TextureID textureID, int *blendMode)
|
||||||
{
|
{
|
||||||
SDL_Texture *texture = SDL_GetTextureFromID(textureID);
|
SDL_Texture *texture = SDL_GetTextureFromID(textureID);
|
||||||
SDL_Renderer *renderer;
|
|
||||||
|
|
||||||
if (!texture) {
|
if (!texture) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1920,7 +1917,6 @@ int
|
||||||
SDL_GetTextureScaleMode(SDL_TextureID textureID, int *scaleMode)
|
SDL_GetTextureScaleMode(SDL_TextureID textureID, int *scaleMode)
|
||||||
{
|
{
|
||||||
SDL_Texture *texture = SDL_GetTextureFromID(textureID);
|
SDL_Texture *texture = SDL_GetTextureFromID(textureID);
|
||||||
SDL_Renderer *renderer;
|
|
||||||
|
|
||||||
if (!texture) {
|
if (!texture) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -590,12 +590,12 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
case WM_XBUTTONDOWN:
|
case WM_XBUTTONDOWN:
|
||||||
xbuttonval = GET_XBUTTON_WPARAM(wParam);
|
xbuttonval = GET_XBUTTON_WPARAM(wParam);
|
||||||
button = SDL_BUTTON_WHEELDOWN + xbuttonval;
|
button = SDL_BUTTON_RIGHT + xbuttonval;
|
||||||
state = SDL_PRESSED;
|
state = SDL_PRESSED;
|
||||||
break;
|
break;
|
||||||
case WM_XBUTTONUP:
|
case WM_XBUTTONUP:
|
||||||
xbuttonval = GET_XBUTTON_WPARAM(wParam);
|
xbuttonval = GET_XBUTTON_WPARAM(wParam);
|
||||||
button = SDL_BUTTON_WHEELDOWN + xbuttonval;
|
button = SDL_BUTTON_RIGHT + xbuttonval;
|
||||||
state = SDL_RELEASED;
|
state = SDL_RELEASED;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue