glfw: Revert error denormalization
This commit is contained in:
parent
44fee8f1f1
commit
ef7ada052c
10 changed files with 146 additions and 146 deletions
|
|
@ -19,11 +19,11 @@ const internal_debug = @import("internal_debug.zig");
|
|||
/// @thread_safety This function must only be called from the main thread.
|
||||
///
|
||||
/// see also: clipboard, glfwGetClipboardString
|
||||
pub inline fn setClipboardString(value: [*:0]const u8) error{ PlatformError }!void {
|
||||
pub inline fn setClipboardString(value: [*:0]const u8) Error!void {
|
||||
internal_debug.assertInitialized();
|
||||
c.glfwSetClipboardString(null, value);
|
||||
getError() catch |err| return switch (err) {
|
||||
Error.PlatformError => @errSetCast(error{ PlatformError }, err),
|
||||
Error.PlatformError => err,
|
||||
else => unreachable,
|
||||
};
|
||||
}
|
||||
|
|
@ -45,11 +45,11 @@ pub inline fn setClipboardString(value: [*:0]const u8) error{ PlatformError }!vo
|
|||
/// @thread_safety This function must only be called from the main thread.
|
||||
///
|
||||
/// see also: clipboard, glfwSetClipboardString
|
||||
pub inline fn getClipboardString() error{ PlatformError }![:0]const u8 {
|
||||
pub inline fn getClipboardString() Error![:0]const u8 {
|
||||
internal_debug.assertInitialized();
|
||||
const value = c.glfwGetClipboardString(null);
|
||||
getError() catch |err| return switch (err) {
|
||||
Error.PlatformError => @errSetCast(error{ PlatformError }, err),
|
||||
Error.PlatformError => err,
|
||||
else => unreachable,
|
||||
};
|
||||
return std.mem.span(value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue