manuals tidy tier 1: suffixes, params, switches, equals-default

This commit is contained in:
2026-05-14 18:58:29 +02:00
parent b7a551c158
commit 8676c0e773
15 changed files with 47 additions and 36 deletions
+3 -3
View File
@@ -260,7 +260,7 @@ inline void JA_Update() {
inline void JA_Init(const int freq, const SDL_AudioFormat format, const int num_channels) {
JA_audioSpec = {.format = format, .channels = num_channels, .freq = freq};
if (sdlAudioDevice != 0u) {
if (sdlAudioDevice != 0U) {
SDL_CloseAudioDevice(sdlAudioDevice);
}
sdlAudioDevice = SDL_OpenAudioDevice(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &JA_audioSpec);
@@ -280,7 +280,7 @@ inline void JA_Quit() {
SDL_DestroyAudioStream(outgoing_music.stream);
outgoing_music.stream = nullptr;
}
if (sdlAudioDevice != 0u) {
if (sdlAudioDevice != 0U) {
SDL_CloseAudioDevice(sdlAudioDevice);
}
sdlAudioDevice = 0;
@@ -586,7 +586,7 @@ inline void JA_EnableMusic(const bool value) {
inline auto JA_LoadSound(uint8_t* buffer, uint32_t size) -> JA_Sound_t* {
auto sound = std::make_unique<JA_Sound_t>();
Uint8* raw = nullptr;
if (!SDL_LoadWAV_IO(SDL_IOFromMem(buffer, size), 1, &sound->spec, &raw, &sound->length)) {
if (!SDL_LoadWAV_IO(SDL_IOFromMem(buffer, size), true, &sound->spec, &raw, &sound->length)) {
std::cout << "Failed to load WAV from memory: " << SDL_GetError() << '\n';
return nullptr;
}