Skip to content

Commit

Permalink
Merge pull request #226 from cmcaine/fix-225
Browse files Browse the repository at this point in the history
Fix #225
  • Loading branch information
SimonDanisch authored Mar 16, 2023
2 parents 6bdd564 + 567ecb2 commit d4158db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/glfw3.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ end
#
# This method tells Julia how to compare an Action and a Bool so that code
# calling GetKey as documented will work as expected.
Base.(==)(b::Bool, a::Action) = b == Integer(a)
Base.:(==)(b::Bool, a::Action) = b == Integer(a)
Base.:(==)(a::Action, b::Bool) = b == a

@enum Key::Cint begin
# Unknown key
Expand Down
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ println(GLFW.GetVersionString())

# https://github.com/JuliaGL/GLFW.jl/pull/225
@test GLFW.PRESS == true
@test true == GLFW.PRESS
@test GLFW.RELEASE == false
@test false == GLFW.RELEASE

if !haskey(ENV, "CI") # AppVeyor and Travis CI don't support OpenGL
include("windowclose.jl")
Expand Down

0 comments on commit d4158db

Please sign in to comment.