Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix various warnings for uninitialized or unused variables and functions
- Loading branch information
|
@@ -199,7 +199,7 @@ static void Mint_CloseAudio(_THIS) |
|
|
|
|
|
static int Mint_CheckAudio(_THIS, SDL_AudioSpec *spec) |
|
|
{ |
|
|
long snd_format; |
|
|
long snd_format = 0; |
|
|
int i, resolution, format_signed, format_bigendian; |
|
|
Uint16 test_format = SDL_FirstAudioFormat(spec->format); |
|
|
int valid_datatype = 0; |
|
|
|
@@ -112,10 +112,11 @@ static int Audio_Available(void) |
|
|
} |
|
|
|
|
|
/* Cookie MCSN present ? */ |
|
|
if (Getcookie(C_McSn, (long *) &cookie_mcsn) != C_FOUND) { |
|
|
if (Getcookie(C_McSn, &dummy) != C_FOUND) { |
|
|
DEBUG_PRINT((DEBUG_NAME "no MCSN audio\n")); |
|
|
return(0); |
|
|
} |
|
|
cookie_mcsn = (cookie_mcsn_t *) dummy; |
|
|
|
|
|
/* Check if interrupt at end of replay */ |
|
|
if (cookie_mcsn->pint == 0) { |
|
|
|
@@ -84,6 +84,7 @@ static void Mint_InitAudio(_THIS, SDL_AudioSpec *spec); |
|
|
|
|
|
static int Audio_Available(void) |
|
|
{ |
|
|
unsigned long dummy; |
|
|
const char *envr = SDL_getenv("SDL_AUDIODRIVER"); |
|
|
|
|
|
/* Check if user asked a different audio driver */ |
|
@@ -103,10 +104,11 @@ static int Audio_Available(void) |
|
|
} |
|
|
|
|
|
/* Cookie STFA present ? */ |
|
|
if (Getcookie(C_STFA, (long *) &cookie_stfa) != C_FOUND) { |
|
|
if (Getcookie(C_STFA, &dummy) != C_FOUND) { |
|
|
DEBUG_PRINT((DEBUG_NAME "no STFA audio\n")); |
|
|
return(0); |
|
|
} |
|
|
cookie_stfa = (cookie_stfa_t *) dummy; |
|
|
|
|
|
SDL_MintAudio_stfa = cookie_stfa; |
|
|
|
|
|
|
@@ -79,7 +79,7 @@ static void Mint_InitAudio(_THIS, SDL_AudioSpec *spec); |
|
|
|
|
|
static int Audio_Available(void) |
|
|
{ |
|
|
unsigned long dummy; |
|
|
/* unsigned long dummy;*/ |
|
|
const char *envr = SDL_getenv("SDL_AUDIODRIVER"); |
|
|
|
|
|
/*SDL_MintAudio_mint_present = (Getcookie(C_MiNT, &dummy) == C_FOUND);*/ |
|
@@ -104,7 +104,7 @@ static int Audio_Available(void) |
|
|
/* Check if we have 16 bits audio */ |
|
|
if ((cookie_snd & SND_16BIT)==0) { |
|
|
DEBUG_PRINT((DEBUG_NAME "no 16 bits sound\n")); |
|
|
return(0); |
|
|
return(0); |
|
|
} |
|
|
|
|
|
/* Check if audio is lockable */ |
|
@@ -334,7 +334,6 @@ static void Mint_CheckExternalClock(_THIS) |
|
|
static int Mint_CheckAudio(_THIS, SDL_AudioSpec *spec) |
|
|
{ |
|
|
int i; |
|
|
Uint32 extclock; |
|
|
|
|
|
DEBUG_PRINT((DEBUG_NAME "asked: %d bits, ",spec->format & 0x00ff)); |
|
|
DEBUG_PRINT(("signed=%d, ", ((spec->format & 0x8000)!=0))); |
|
|
|
@@ -48,9 +48,9 @@ |
|
|
|
|
|
/*--- Functions prototypes ---*/ |
|
|
|
|
|
#if SDL_VIDEO_OPENGL |
|
|
static void SDL_AtariGL_UnloadLibrary(_THIS); |
|
|
|
|
|
#if SDL_VIDEO_OPENGL |
|
|
static void CopyShadowNull(_THIS, SDL_Surface *surface); |
|
|
static void CopyShadowDirect(_THIS, SDL_Surface *surface); |
|
|
static void CopyShadowRGBTo555(_THIS, SDL_Surface *surface); |
|
@@ -389,22 +389,20 @@ void SDL_AtariGL_InitPointers(_THIS) |
|
|
|
|
|
/*--- Private functions ---*/ |
|
|
|
|
|
#if SDL_VIDEO_OPENGL |
|
|
static void SDL_AtariGL_UnloadLibrary(_THIS) |
|
|
{ |
|
|
#if SDL_VIDEO_OPENGL |
|
|
if (this->gl_config.dll_handle) { |
|
|
SDL_UnloadObject(this->gl_config.dll_handle); |
|
|
this->gl_config.dll_handle = NULL; |
|
|
|
|
|
/* Restore pointers to static library */ |
|
|
SDL_AtariGL_InitPointers(this); |
|
|
} |
|
|
#endif |
|
|
} |
|
|
|
|
|
/*--- Creation of an OpenGL context using new/old functions ---*/ |
|
|
|
|
|
#if SDL_VIDEO_OPENGL |
|
|
static int InitNew(_THIS, SDL_Surface *current) |
|
|
{ |
|
|
GLenum osmesa_format; |
|
|
|
@@ -47,8 +47,8 @@ static void UpdateSpecialKeys(int special_keys_state); |
|
|
|
|
|
void AtariBios_InitOSKeymap(_THIS) |
|
|
{ |
|
|
int i, vectors_mask; |
|
|
unsigned long dummy; |
|
|
int vectors_mask; |
|
|
/* unsigned long dummy;*/ |
|
|
|
|
|
SDL_memset(bios_currentkeyboard, 0, sizeof(bios_currentkeyboard)); |
|
|
SDL_memset(bios_previouskeyboard, 0, sizeof(bios_previouskeyboard)); |
|
|
|
@@ -56,8 +56,8 @@ static void UpdateSpecialKeys(int special_keys_state); |
|
|
|
|
|
void AtariGemdos_InitOSKeymap(_THIS) |
|
|
{ |
|
|
int i, vectors_mask; |
|
|
unsigned long dummy; |
|
|
int vectors_mask; |
|
|
/* unsigned long dummy;*/ |
|
|
|
|
|
SDL_memset(gemdos_currentkeyboard, 0, sizeof(gemdos_currentkeyboard)); |
|
|
SDL_memset(gemdos_previouskeyboard, 0, sizeof(gemdos_previouskeyboard)); |
|
|
|
@@ -45,9 +45,7 @@ static Uint16 atari_prevmouseb; /* save state of mouse buttons */ |
|
|
|
|
|
void AtariIkbd_InitOSKeymap(_THIS) |
|
|
{ |
|
|
int i; |
|
|
|
|
|
SDL_memset(SDL_AtariIkbd_keyboard, KEY_UNDEFINED, sizeof(SDL_AtariIkbd_keyboard)); |
|
|
SDL_memset((void *) SDL_AtariIkbd_keyboard, KEY_UNDEFINED, sizeof(SDL_AtariIkbd_keyboard)); |
|
|
|
|
|
/* Now install our handler */ |
|
|
SDL_AtariIkbd_mouseb = SDL_AtariIkbd_mousex = SDL_AtariIkbd_mousey = 0; |
|
@@ -72,7 +70,7 @@ static int atari_GetButton(int button) |
|
|
|
|
|
void AtariIkbd_PumpEvents(_THIS) |
|
|
{ |
|
|
int i, specialkeys; |
|
|
int i; |
|
|
SDL_keysym keysym; |
|
|
|
|
|
/*--- Send keyboard events ---*/ |
|
|
|
@@ -36,6 +36,7 @@ |
|
|
#include "../../events/SDL_events_c.h" |
|
|
#include "SDL_gemvideo.h" |
|
|
#include "SDL_gemevents_c.h" |
|
|
#include "SDL_gemmouse_c.h" |
|
|
#include "../ataricommon/SDL_atarikeys.h" /* for keyboard scancodes */ |
|
|
#include "../ataricommon/SDL_atarievents_c.h" |
|
|
#include "../ataricommon/SDL_xbiosevents_c.h" |
|
|
|
@@ -34,6 +34,7 @@ |
|
|
#include "../SDL_cursor_c.h" |
|
|
#include "SDL_gemmouse_c.h" |
|
|
#include "SDL_gemvideo.h" |
|
|
#include "../ataricommon/SDL_xbiosevents_c.h" |
|
|
|
|
|
/* Defines */ |
|
|
|
|
|
|
@@ -129,7 +129,7 @@ static SDL_VideoDevice *GEM_CreateDevice(int devindex) |
|
|
{ |
|
|
SDL_VideoDevice *device; |
|
|
int vectors_mask; |
|
|
unsigned long dummy; |
|
|
/* unsigned long dummy;*/ |
|
|
|
|
|
/* Initialize all variables that we clean on shutdown */ |
|
|
device = (SDL_VideoDevice *)SDL_malloc(sizeof(SDL_VideoDevice)); |
|
|
|
@@ -138,7 +138,7 @@ static const xbiosmode_t falconvgamodes[6]={ |
|
|
|
|
|
static int XBIOS_Available(void) |
|
|
{ |
|
|
unsigned long cookie_vdo, cookie_mil, cookie_hade, cookie_scpn; |
|
|
unsigned long cookie_vdo, /*cookie_mil,*/ cookie_hade, cookie_scpn; |
|
|
unsigned long cookie_fvdi; |
|
|
const char *envr = SDL_getenv("SDL_VIDEODRIVER"); |
|
|
|
|
@@ -361,8 +361,7 @@ static void XBIOS_ListFalconVgaModes(_THIS, int actually_add) |
|
|
|
|
|
static int XBIOS_VideoInit(_THIS, SDL_PixelFormat *vformat) |
|
|
{ |
|
|
int i,j8,j16; |
|
|
xbiosmode_t *current_mode; |
|
|
int i; |
|
|
unsigned long cookie_blow, cookie_scpn, cookie_cnts; |
|
|
|
|
|
/* Initialize all variables that we clean on shutdown */ |
|
@@ -1101,7 +1100,7 @@ static void XBIOS_VideoQuit(_THIS) |
|
|
|
|
|
/* Restore screensavers */ |
|
|
if (SDL_XBIOS_TveillePresent(this)) { |
|
|
SDL_XBIOS_TveilleRestore(this); |
|
|
SDL_XBIOS_TveilleEnable(this); |
|
|
} |
|
|
} |
|
|
|
|
|
|
@@ -32,21 +32,32 @@ |
|
|
#include "SDL_xbios.h" |
|
|
#include "SDL_xbios_tveille.h" |
|
|
|
|
|
static tveille_t *cookie_veil; |
|
|
static tveille_t *cookie_veil = NULL; |
|
|
static int status; |
|
|
|
|
|
int SDL_XBIOS_TveillePresent(_THIS) |
|
|
{ |
|
|
return (Getcookie(C_VeiL, (unsigned long *)&cookie_veil) == C_FOUND); |
|
|
unsigned long dummy; |
|
|
|
|
|
cookie_veil = NULL; |
|
|
if (Getcookie(C_VeiL, &dummy) == C_FOUND) { |
|
|
cookie_veil = (tveille_t *) dummy; |
|
|
} |
|
|
|
|
|
return (cookie_veil != NULL); |
|
|
} |
|
|
|
|
|
void SDL_XBIOS_TveilleDisable(_THIS) |
|
|
{ |
|
|
status = cookie_veil->enabled; |
|
|
cookie_veil->enabled = 0xff; |
|
|
if (cookie_veil) { |
|
|
status = cookie_veil->enabled; |
|
|
cookie_veil->enabled = 0xff; |
|
|
} |
|
|
} |
|
|
|
|
|
void SDL_XBIOS_TveilleRestore(_THIS) |
|
|
void SDL_XBIOS_TveilleEnable(_THIS) |
|
|
{ |
|
|
cookie_veil->enabled = status; |
|
|
if (cookie_veil) { |
|
|
cookie_veil->enabled = status; |
|
|
} |
|
|
} |