aboutsummaryrefslogtreecommitdiff
path: root/src/library_sdl.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/library_sdl.js')
-rw-r--r--src/library_sdl.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index 4ad7a9a9..3b412daa 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -1079,7 +1079,9 @@ var LibrarySDL = {
}
var surf = SDL.makeSurface(raw.width, raw.height, 0, false, 'load:' + filename);
var surfData = SDL.surfaces[surf];
+ surfData.ctx.globalCompositeOperation = "copy";
surfData.ctx.drawImage(raw, 0, 0, raw.width, raw.height, 0, 0, raw.width, raw.height);
+ surfData.ctx.globalCompositeOperation = "source-over";
// XXX SDL does not specify that loaded images must have available pixel data, in fact
// there are cases where you just want to blit them, so you just need the hardware
// accelerated version. However, code everywhere seems to assume that the pixels
@@ -1178,6 +1180,12 @@ var LibrarySDL = {
// SDL Mixer
+ Mix_Init: function(flags) {
+ if (!flags) return 0;
+ return 8; /* MIX_INIT_OGG */
+ },
+ Mix_Quit: function(){},
+
Mix_OpenAudio: function(frequency, format, channels, chunksize) {
SDL.allocateChannels(32);
// Just record the values for a later call to Mix_QuickLoad_RAW