X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsdl.c;h=f10dfd6dc2322f3b72ae2701b54d1439279f0121;hb=696d50b659131ba46ea7f4c44ca4d29475e8cb4f;hp=c4e15425714a15688d48be46db37e1762cb58a96;hpb=93806fb4c23f4b6ef58d9562e908a1b89ece869d;p=rocksndiamonds.git diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index c4e15425..f10dfd6d 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -853,6 +853,9 @@ Bitmap *SDLLoadImage(char *filename) /* free temporary surface */ SDL_FreeSurface(sdl_image_tmp); + new_bitmap->width = new_bitmap->surface->w; + new_bitmap->height = new_bitmap->surface->h; + return new_bitmap; } @@ -885,13 +888,11 @@ inline void SDLOpenAudio(void) /* determine number of available channels */ audio.channels = Mix_AllocateChannels(MIX_CHANNELS); - if (!audio.mods_available) /* reserve first channel for music loops */ - { - if (Mix_ReserveChannels(1) == 1) - audio.music_channel = 0; - else - audio.music_available = FALSE; - } + /* reserve first channel for music loops */ + if (Mix_ReserveChannels(1) == 1) + audio.music_channel = 0; + else + audio.music_available = FALSE; Mix_Volume(-1, SOUND_MAX_VOLUME); Mix_VolumeMusic(SOUND_MAX_VOLUME);