Fixes for Emscripten+SDL2
This commit is contained in:
@@ -493,10 +493,6 @@ int Draw_LoopIteration() {
|
||||
Input_SetPointerPosition(event.tfinger.x, event.tfinger.y);
|
||||
Input_SetPointerDown(1);
|
||||
}
|
||||
if (event.type == SDL_TOUCHBUTTONDOWN) {
|
||||
Input_SetPointerPosition(event.tfinger.x, event.tfinger.y);
|
||||
Input_SetPointerDown(1);
|
||||
}
|
||||
if (event.type == SDL_MOUSEBUTTONUP) {
|
||||
Input_SetPointerPosition(event.button.x / (float)_width,
|
||||
event.button.y / (float)_height);
|
||||
@@ -506,10 +502,6 @@ int Draw_LoopIteration() {
|
||||
Input_SetPointerPosition(event.tfinger.x, event.tfinger.y);
|
||||
Input_SetPointerDown(0);
|
||||
}
|
||||
if (event.type == SDL_TOUCHBUTTONUP) {
|
||||
Input_SetPointerPosition(event.tfinger.x, event.tfinger.y);
|
||||
Input_SetPointerDown(0);
|
||||
}
|
||||
}
|
||||
#else
|
||||
while (SDL_PollEvent(&event)) {
|
||||
|
||||
@@ -31,7 +31,7 @@ int MaximumInt(int i0, int i1) {
|
||||
// Rect
|
||||
//
|
||||
|
||||
int Rect_UnionRect(Rect r0, Rect r1, Rect rd) {
|
||||
void Rect_UnionRect(Rect r0, Rect r1, Rect rd) {
|
||||
rd->x0 = MinimumInt(r0->x0, r1->x0);
|
||||
rd->y0 = MinimumInt(r0->y0, r1->y0);
|
||||
rd->x1 = MaximumInt(r0->x1, r1->x1);
|
||||
|
||||
@@ -30,7 +30,7 @@ struct SRect {
|
||||
int y1;
|
||||
};
|
||||
|
||||
int Rect_UnionRect(Rect r0, Rect r1, Rect rd);
|
||||
void Rect_UnionRect(Rect r0, Rect r1, Rect rd);
|
||||
int Rect_PointInside(Rect r, int x, int y);
|
||||
int Rect_PointInsideAny(TRect r[], int rCount, int x, int y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user