gfx.clip_height = height;
}
-void InitGfxDrawBusyAnimFunction(void (*draw_busy_anim_function)(void))
+void InitGfxDrawBusyAnimFunction(void (*draw_busy_anim_function)(boolean))
{
gfx.draw_busy_anim_function = draw_busy_anim_function;
}
video.window_scaling_available = WINDOW_SCALING_STATUS;
video.frame_counter = 0;
- video.frame_delay = 0;
- video.frame_delay_value = GAME_FRAME_DELAY;
+ video.frame_delay.count = 0;
+ video.frame_delay.value = GAME_FRAME_DELAY;
video.shifted_up = FALSE;
video.shifted_up_pos = 0;
video.shifted_up_pos_last = 0;
- video.shifted_up_delay = 0;
- video.shifted_up_delay_value = ONE_SECOND_DELAY / 4;
+ video.shifted_up_delay.count = 0;
+ video.shifted_up_delay.value = ONE_SECOND_DELAY / 4;
SDLInitVideoBuffer(fullscreen);
void FillRectangle(Bitmap *bitmap, int x, int y, int width, int height,
Pixel color)
{
+ if (program.headless)
+ return;
+
if (DrawingDeactivated(x, y, width, height))
return;
void SetVideoFrameDelay(unsigned int frame_delay_value)
{
- video.frame_delay_value = frame_delay_value;
+ video.frame_delay.value = frame_delay_value;
}
unsigned int GetVideoFrameDelay(void)
{
- return video.frame_delay_value;
+ return video.frame_delay.value;
}
boolean ChangeVideoModeIfNeeded(boolean fullscreen)
{
#if defined(PLATFORM_EMSCRIPTEN)
EM_ASM
- (
+ ({
+ dir = UTF8ToString($0);
+
Module.sync_done = 0;
- FS.mkdir('/persistent'); // create persistent data directory
- FS.mount(IDBFS, {}, '/persistent'); // mount with IDBFS filesystem type
+ FS.mkdir(dir); // create persistent data directory
+ FS.mount(IDBFS, {}, dir); // mount with IDBFS filesystem type
FS.syncfs(true, function(err) // sync persistent data into memory
{
assert(!err);
Module.sync_done = 1;
});
- );
+ }, PERSISTENT_DIRECTORY);
// wait for persistent data to be synchronized to memory
while (emscripten_run_script_int("Module.sync_done") == 0)