mirror of
https://github.com/yawut/SDL.git
synced 2026-09-14 20:16:32 -05:00
In general, fill in pointers to structures, rather than return them.
This commit is contained in:
@@ -237,7 +237,8 @@ extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);
|
||||
* Must be a value between 0 and (number of audio devices-1).
|
||||
* Only valid after a successfully initializing the audio subsystem.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetAudioDevice(int index, int iscapture);
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetAudioDevice(int index,
|
||||
int iscapture);
|
||||
|
||||
|
||||
/*
|
||||
@@ -245,11 +246,14 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDevice(int index, int iscapture)
|
||||
* equivalent to SDL_OpenAudio(). Returns 0 on error, a valid device ID
|
||||
* on success.
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(
|
||||
const char * device,
|
||||
int iscapture,
|
||||
const SDL_AudioSpec * desired,
|
||||
SDL_AudioSpec * obtained);
|
||||
extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(const char
|
||||
*device,
|
||||
int iscapture,
|
||||
const
|
||||
SDL_AudioSpec *
|
||||
desired,
|
||||
SDL_AudioSpec *
|
||||
obtained);
|
||||
|
||||
|
||||
|
||||
@@ -264,8 +268,8 @@ typedef enum
|
||||
} SDL_audiostatus;
|
||||
extern DECLSPEC SDL_audiostatus SDLCALL SDL_GetAudioStatus(void);
|
||||
|
||||
extern DECLSPEC SDL_audiostatus SDLCALL SDL_GetAudioDeviceStatus(
|
||||
SDL_AudioDeviceID dev);
|
||||
extern DECLSPEC SDL_audiostatus SDLCALL
|
||||
SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
|
||||
|
||||
/*
|
||||
* This function pauses and unpauses the audio callback processing.
|
||||
@@ -352,7 +356,8 @@ extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
|
||||
* using the format of audio device 1. Thus it can be used when no audio
|
||||
* device is open at all.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src,
|
||||
extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
|
||||
const Uint8 * src,
|
||||
SDL_AudioFormat format,
|
||||
Uint32 len, int volume);
|
||||
|
||||
|
||||
@@ -432,7 +432,7 @@ extern DECLSPEC int SDLCALL SDL_GetCurrentVideoDisplay(void);
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(void);
|
||||
|
||||
/**
|
||||
* \fn const SDL_DisplayMode *SDL_GetDisplayMode(int index)
|
||||
* \fn int SDL_GetDisplayMode(int index, SDL_DisplayMode *mode)
|
||||
*
|
||||
* \brief Retrieve information about a specific display mode.
|
||||
*
|
||||
@@ -444,23 +444,22 @@ extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(void);
|
||||
*
|
||||
* \sa SDL_GetNumDisplayModes()
|
||||
*/
|
||||
extern DECLSPEC const SDL_DisplayMode *SDLCALL SDL_GetDisplayMode(int index);
|
||||
extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int index,
|
||||
SDL_DisplayMode * mode);
|
||||
|
||||
/**
|
||||
* \fn const SDL_DisplayMode *SDL_GetDesktopDisplayMode(void)
|
||||
* \fn int SDL_GetDesktopDisplayMode(SDL_DisplayMode *mode)
|
||||
*
|
||||
* \brief Retrieve information about the desktop display mode for the current display.
|
||||
*/
|
||||
extern DECLSPEC const SDL_DisplayMode *SDLCALL
|
||||
SDL_GetDesktopDisplayMode(void);
|
||||
extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(SDL_DisplayMode * mode);
|
||||
|
||||
/**
|
||||
* \fn const SDL_DisplayMode *SDL_GetCurrentDisplayMode(void)
|
||||
* \fn int SDL_GetCurrentDisplayMode(SDL_DisplayMode *mode)
|
||||
*
|
||||
* \brief Retrieve information about the current display mode.
|
||||
*/
|
||||
extern DECLSPEC const SDL_DisplayMode *SDLCALL
|
||||
SDL_GetCurrentDisplayMode(void);
|
||||
extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(SDL_DisplayMode * mode);
|
||||
|
||||
/**
|
||||
* \fn SDL_DisplayMode *SDL_GetClosestDisplayMode(const SDL_DisplayMode *mode, SDL_DisplayMode *closest)
|
||||
@@ -499,13 +498,13 @@ extern DECLSPEC int SDLCALL SDL_SetFullscreenDisplayMode(const SDL_DisplayMode
|
||||
* mode);
|
||||
|
||||
/**
|
||||
* \fn const SDL_DisplayMode *SDL_GetFullscreenDisplayMode(void)
|
||||
* \fn int SDL_GetFullscreenDisplayMode(SDL_DisplayMode *mode)
|
||||
*
|
||||
* \brief Query the display mode used when a fullscreen window is visible
|
||||
* on the currently selected display.
|
||||
*/
|
||||
extern DECLSPEC const SDL_DisplayMode *SDLCALL
|
||||
SDL_GetFullscreenDisplayMode(void);
|
||||
extern DECLSPEC int SDLCALL SDL_GetFullscreenDisplayMode(SDL_DisplayMode *
|
||||
mode);
|
||||
|
||||
/**
|
||||
* \fn int SDL_SetDisplayPalette(const SDL_Color *colors, int firstcolor, int ncolors)
|
||||
|
||||
Reference in New Issue
Block a user