mirror of
https://github.com/joel16/SDL2.git
synced 2024-12-05 01:46:25 +00:00
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
BIN
VisualC.zip
BIN
VisualC.zip
Binary file not shown.
@ -243,7 +243,7 @@ SDL_CompatEventFilter(void *userdata, SDL_Event * event)
|
||||
case SDL_TEXTINPUT:
|
||||
{
|
||||
/* 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;
|
||||
}
|
||||
case SDL_MOUSEWHEEL:
|
||||
|
@ -555,7 +555,7 @@ prepare_audiospec(const SDL_AudioSpec * orig, SDL_AudioSpec * prepared)
|
||||
switch (orig->channels) {
|
||||
case 0:{
|
||||
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 */
|
||||
}
|
||||
break;
|
||||
|
@ -1177,7 +1177,9 @@ SDL_RateSLOW(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||
case 32:
|
||||
{
|
||||
/* !!! FIXME: need 32-bit converter here! */
|
||||
#ifdef DEBUG_CONVERT
|
||||
fprintf(stderr, "FIXME: need 32-bit converter here!\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -1214,7 +1216,9 @@ SDL_RateSLOW(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||
case 32:
|
||||
{
|
||||
/* !!! FIXME: need 32-bit converter here! */
|
||||
#ifdef DEBUG_CONVERT
|
||||
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;
|
||||
double dst_sample;
|
||||
/* !!! FIXME: are these right? */
|
||||
const double max_audioval = 3.40282347e+38F;
|
||||
const double min_audioval = -3.40282347e+38F;
|
||||
const double max_audioval = 3.402823466e+38F;
|
||||
const double min_audioval = -3.402823466e+38F;
|
||||
|
||||
len /= 4;
|
||||
while (len--) {
|
||||
@ -332,8 +332,8 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
|
||||
float src1, src2;
|
||||
double dst_sample;
|
||||
/* !!! FIXME: are these right? */
|
||||
const double max_audioval = 3.40282347e+38F;
|
||||
const double min_audioval = -3.40282347e+38F;
|
||||
const double max_audioval = 3.402823466e+38F;
|
||||
const double min_audioval = -3.402823466e+38F;
|
||||
|
||||
len /= 4;
|
||||
while (len--) {
|
||||
|
@ -347,7 +347,6 @@ SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
||||
if (SDL_ISPIXELFORMAT_FOURCC(texture->format)) {
|
||||
texture->driverdata = SDL_SW_CreateYUVTexture(texture);
|
||||
} else {
|
||||
SDL_Surface *surface;
|
||||
int bpp;
|
||||
Uint32 Rmask, Gmask, Bmask, Amask;
|
||||
|
||||
|
@ -939,7 +939,6 @@ void
|
||||
SDL_SetWindowTitle(SDL_WindowID windowID, const char *title)
|
||||
{
|
||||
SDL_Window *window = SDL_GetWindowFromID(windowID);
|
||||
const char *last_title;
|
||||
|
||||
if (!window || title == window->title) {
|
||||
return;
|
||||
@ -1852,7 +1851,6 @@ int
|
||||
SDL_GetTextureAlphaMod(SDL_TextureID textureID, Uint8 * alpha)
|
||||
{
|
||||
SDL_Texture *texture = SDL_GetTextureFromID(textureID);
|
||||
SDL_Renderer *renderer;
|
||||
|
||||
if (!texture) {
|
||||
return -1;
|
||||
@ -1886,7 +1884,6 @@ int
|
||||
SDL_GetTextureBlendMode(SDL_TextureID textureID, int *blendMode)
|
||||
{
|
||||
SDL_Texture *texture = SDL_GetTextureFromID(textureID);
|
||||
SDL_Renderer *renderer;
|
||||
|
||||
if (!texture) {
|
||||
return -1;
|
||||
@ -1920,7 +1917,6 @@ int
|
||||
SDL_GetTextureScaleMode(SDL_TextureID textureID, int *scaleMode)
|
||||
{
|
||||
SDL_Texture *texture = SDL_GetTextureFromID(textureID);
|
||||
SDL_Renderer *renderer;
|
||||
|
||||
if (!texture) {
|
||||
return -1;
|
||||
|
@ -590,12 +590,12 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
case WM_XBUTTONDOWN:
|
||||
xbuttonval = GET_XBUTTON_WPARAM(wParam);
|
||||
button = SDL_BUTTON_WHEELDOWN + xbuttonval;
|
||||
button = SDL_BUTTON_RIGHT + xbuttonval;
|
||||
state = SDL_PRESSED;
|
||||
break;
|
||||
case WM_XBUTTONUP:
|
||||
xbuttonval = GET_XBUTTON_WPARAM(wParam);
|
||||
button = SDL_BUTTON_WHEELDOWN + xbuttonval;
|
||||
button = SDL_BUTTON_RIGHT + xbuttonval;
|
||||
state = SDL_RELEASED;
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user