@@ -40,7 +40,7 @@ const char *emscripten_result_to_string(EMSCRIPTEN_RESULT result) {
4040// Returning 0 signals that the event was not consumed by the code, and will allow the event to pass on and bubble up normally.
4141EM_BOOL key_callback (int eventType , const EmscriptenKeyboardEvent * e , void * userData )
4242{
43- printf ("%s, key: \"%s\", code: \"%s\", location: %lu ,%s%s%s%s repeat: %d, locale: \"%s\", char: \"%s\", charCode: %lu , keyCode: %lu , which: %lu , timestamp: %lf\n" ,
43+ printf ("%s, key: \"%s\", code: \"%s\", location: %u ,%s%s%s%s repeat: %d, locale: \"%s\", char: \"%s\", charCode: %u , keyCode: %u , which: %u , timestamp: %lf\n" ,
4444 emscripten_event_type_to_string (eventType ), e -> key , e -> code , e -> location ,
4545 e -> ctrlKey ? " CTRL" : "" , e -> shiftKey ? " SHIFT" : "" , e -> altKey ? " ALT" : "" , e -> metaKey ? " META" : "" ,
4646 e -> repeat , e -> locale , e -> charValue , e -> charCode , e -> keyCode , e -> which ,
@@ -91,7 +91,7 @@ EM_BOOL key_callback(int eventType, const EmscriptenKeyboardEvent *e, void *user
9191
9292EM_BOOL mouse_callback (int eventType , const EmscriptenMouseEvent * e , void * userData )
9393{
94- printf ("%s, screen: (%ld,%ld ), client: (%ld,%ld ),%s%s%s%s button: %hu, buttons: %hu, movement: (%ld,%ld ), canvas: (%ld,%ld ), timestamp: %lf\n" ,
94+ printf ("%s, screen: (%d,%d ), client: (%d,%d ),%s%s%s%s button: %hu, buttons: %hu, movement: (%d,%d ), canvas: (%d,%d ), timestamp: %lf\n" ,
9595 emscripten_event_type_to_string (eventType ), e -> screenX , e -> screenY , e -> clientX , e -> clientY ,
9696 e -> ctrlKey ? " CTRL" : "" , e -> shiftKey ? " SHIFT" : "" , e -> altKey ? " ALT" : "" , e -> metaKey ? " META" : "" ,
9797 e -> button , e -> buttons , e -> movementX , e -> movementY , e -> canvasX , e -> canvasY ,
@@ -102,7 +102,7 @@ EM_BOOL mouse_callback(int eventType, const EmscriptenMouseEvent *e, void *userD
102102
103103EM_BOOL wheel_callback (int eventType , const EmscriptenWheelEvent * e , void * userData )
104104{
105- printf ("%s, screen: (%ld,%ld ), client: (%ld,%ld ),%s%s%s%s button: %hu, buttons: %hu, canvas: (%ld,%ld ), delta:(%g,%g,%g), deltaMode:%lu , timestamp: %lf\n" ,
105+ printf ("%s, screen: (%d,%d ), client: (%d,%d ),%s%s%s%s button: %hu, buttons: %hu, canvas: (%d,%d ), delta:(%g,%g,%g), deltaMode:%u , timestamp: %lf\n" ,
106106 emscripten_event_type_to_string (eventType ), e -> mouse .screenX , e -> mouse .screenY , e -> mouse .clientX , e -> mouse .clientY ,
107107 e -> mouse .ctrlKey ? " CTRL" : "" , e -> mouse .shiftKey ? " SHIFT" : "" , e -> mouse .altKey ? " ALT" : "" , e -> mouse .metaKey ? " META" : "" ,
108108 e -> mouse .button , e -> mouse .buttons , e -> mouse .canvasX , e -> mouse .canvasY ,
@@ -114,7 +114,7 @@ EM_BOOL wheel_callback(int eventType, const EmscriptenWheelEvent *e, void *userD
114114
115115EM_BOOL uievent_callback (int eventType , const EmscriptenUiEvent * e , void * userData )
116116{
117- printf ("%s, detail: %ld , document.body.client size: (%d,%d), window.inner size: (%d,%d), scrollPos: (%d, %d)\n" ,
117+ printf ("%s, detail: %d , document.body.client size: (%d,%d), window.inner size: (%d,%d), scrollPos: (%d, %d)\n" ,
118118 emscripten_event_type_to_string (eventType ), e -> detail , e -> documentBodyClientWidth , e -> documentBodyClientHeight ,
119119 e -> windowInnerWidth , e -> windowInnerHeight , e -> scrollTop , e -> scrollLeft );
120120
@@ -187,7 +187,7 @@ EM_BOOL touch_callback(int eventType, const EmscriptenTouchEvent *e, void *userD
187187 for (int i = 0 ; i < e -> numTouches ; ++ i )
188188 {
189189 const EmscriptenTouchPoint * t = & e -> touches [i ];
190- printf (" %ld : screen: (%ld,%ld ), client: (%ld,%ld ), page: (%ld,%ld ), isChanged: %d, onTarget: %d, canvas: (%ld , %ld )\n" ,
190+ printf (" %d : screen: (%d,%d ), client: (%d,%d ), page: (%d,%d ), isChanged: %d, onTarget: %d, canvas: (%d , %d )\n" ,
191191 t -> identifier , t -> screenX , t -> screenY , t -> clientX , t -> clientY , t -> pageX , t -> pageY , t -> isChanged , t -> onTarget , t -> canvasX , t -> canvasY );
192192 }
193193
0 commit comments