2
0
ncannasse 7 жил өмнө
parent
commit
e2f8143e0e
1 өөрчлөгдсөн 5 нэмэгдсэн , 0 устгасан
  1. 5 0
      libs/sdl/sdl.c

+ 5 - 0
libs/sdl/sdl.c

@@ -247,7 +247,9 @@ HL_PRIM void HL_NAME(quit)() {
 }
 
 HL_PRIM void HL_NAME(delay)( int time ) {
+	hl_blocking(true);
 	SDL_Delay(time);
+	hl_blocking(false);
 }
 
 HL_PRIM int HL_NAME(get_screen_width)() {
@@ -264,9 +266,12 @@ HL_PRIM int HL_NAME(get_screen_height)() {
 
 
 HL_PRIM void HL_NAME(message_box)(vbyte *title, vbyte *text, bool error) {
+	hl_blocking(true);
 	SDL_ShowSimpleMessageBox(error ? SDL_MESSAGEBOX_ERROR : 0, (char*)title, (char*)text, NULL);
+	hl_blocking(false);
 }
 
+
 HL_PRIM void HL_NAME(set_vsync)(bool v) {
 	SDL_GL_SetSwapInterval(v ? 1 : 0);
 }