glfw: replace isize, usize with i32, u32 where appropriate (#126)
Fixes hexops/mach#114
This commit is contained in:
parent
8b5fdbc333
commit
595cf48450
8 changed files with 87 additions and 87 deletions
|
|
@ -214,7 +214,7 @@ pub const Key = enum(c_int) {
|
|||
/// @thread_safety This function must only be called from the main thread.
|
||||
///
|
||||
/// see also: input_key_name
|
||||
pub inline fn getName(self: Key, scancode: isize) error{PlatformError}!?[:0]const u8 {
|
||||
pub inline fn getName(self: Key, scancode: i32) error{PlatformError}!?[:0]const u8 {
|
||||
internal_debug.assertInitialized();
|
||||
const name_opt = cc.glfwGetKeyName(@enumToInt(self), @intCast(c_int, scancode));
|
||||
getError() catch |err| return switch (err) {
|
||||
|
|
@ -240,7 +240,7 @@ pub const Key = enum(c_int) {
|
|||
/// Possible errors include glfw.Error.NotInitialized, glfw.Error.InvalidEnum and glfw.Error.PlatformError.
|
||||
///
|
||||
/// @thread_safety This function may be called from any thread.
|
||||
pub inline fn getScancode(self: Key) error{PlatformError}!isize {
|
||||
pub inline fn getScancode(self: Key) error{PlatformError}!i32 {
|
||||
internal_debug.assertInitialized();
|
||||
const scancode = cc.glfwGetKeyScancode(@enumToInt(self));
|
||||
getError() catch |err| return switch (err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue