Skip to content

Commit

Permalink
emscripten: fix compile time warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jayrm committed Dec 6, 2020
1 parent 6d5c492 commit 375d7dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/gfxlib2/js/gfx_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ void fb_js_events_init(void)

// don't let SDL capture the keyboard
__fb_js_ctx.doNotCaptureKeyboard = emscripten_run_script_int("Module['doNotCaptureKeyboard']? 1: 0;");
if(!__fb_js_ctx.doNotCaptureKeyboard)
if(!__fb_js_ctx.doNotCaptureKeyboard) {
emscripten_run_script("Module['doNotCaptureKeyboard']=1;");
}

return;
}
Expand Down
6 changes: 3 additions & 3 deletions src/rtlib/js/io_readxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ FBCALL unsigned int fb_ConsoleReadXY( int col, int row, int colorflag )
{
unsigned int res = 0;

if( colorflag )
if( colorflag ) {
res = EM_ASM_INT({
__fb_rtlib.console.charAt($0, $1)
}, col-1, row-1);
else
} else {
res = EM_ASM_INT({
__fb_rtlib.console.colorAt($0, $1)
}, col-1, row-1);

}
return res;
}

0 comments on commit 375d7dc

Please sign in to comment.