REVIEWED: Formatting, follow raylib coding conventions
This commit is contained in:
parent
13e3092511
commit
1e1061d5c7
11 changed files with 77 additions and 78 deletions
|
@ -1028,7 +1028,7 @@ int InitPlatform(void)
|
|||
|
||||
// If graphic device is no properly initialized, we end program
|
||||
if (!CORE.Window.ready) { TRACELOG(LOG_FATAL, "PLATFORM: Failed to initialize graphic device"); return -1; }
|
||||
else SetWindowPosition(GetMonitorWidth(GetCurrentMonitor()) / 2 - CORE.Window.screen.width / 2, GetMonitorHeight(GetCurrentMonitor()) / 2 - CORE.Window.screen.height / 2);
|
||||
else SetWindowPosition(GetMonitorWidth(GetCurrentMonitor())/2 - CORE.Window.screen.width/2, GetMonitorHeight(GetCurrentMonitor())/2 - CORE.Window.screen.height/2);
|
||||
|
||||
// Set some default window flags
|
||||
CORE.Window.flags &= ~FLAG_WINDOW_HIDDEN; // false
|
||||
|
@ -1614,7 +1614,7 @@ static void PollKeyboardEvents(void)
|
|||
}
|
||||
}
|
||||
|
||||
TRACELOG(LOG_DEBUG, "INPUT: KEY_%s Keycode(linux): %4i KeyCode(raylib): %4i", (event.value == 0) ? "UP " : "DOWN", event.code, keycode);
|
||||
TRACELOG(LOG_DEBUG, "INPUT: KEY_%s Keycode(linux): %4i KeyCode(raylib): %4i", (event.value == 0)? "UP " : "DOWN", event.code, keycode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1641,7 +1641,7 @@ static void PollGamepadEvents(void)
|
|||
{
|
||||
short keycodeRaylib = linuxToRaylibMap[event.code];
|
||||
|
||||
TRACELOG(LOG_DEBUG, "INPUT: Gamepad %2i: KEY_%s Keycode(linux): %4i Keycode(raylib): %4i", i, (event.value == 0) ? "UP " : "DOWN", event.code, keycodeRaylib);
|
||||
TRACELOG(LOG_DEBUG, "INPUT: Gamepad %2i: KEY_%s Keycode(linux): %4i Keycode(raylib): %4i", i, (event.value == 0)? "UP" : "DOWN", event.code, keycodeRaylib);
|
||||
|
||||
if ((keycodeRaylib != 0) && (keycodeRaylib < MAX_GAMEPAD_BUTTONS))
|
||||
{
|
||||
|
@ -1666,7 +1666,7 @@ static void PollGamepadEvents(void)
|
|||
int range = platform.gamepadAbsAxisRange[i][event.code][1];
|
||||
|
||||
// NOTE: Scaling of event.value to get values between -1..1
|
||||
CORE.Input.Gamepad.axisState[i][axisRaylib] = (2 * (float)(event.value - min) / range) - 1;
|
||||
CORE.Input.Gamepad.axisState[i][axisRaylib] = (2*(float)(event.value - min)/range) - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue