lovebrew / lovepotion

LÖVE for Nintendo Homebrew
https://lovebrew.org
Other
538 stars 41 forks source link

[Bug]: Get3D/get3DDepth #199

Closed wewewer123 closed 1 year ago

wewewer123 commented 1 year ago

Software Version

3.0-pre4

What Happened?

the function Get3D returned true, even with my slider all the way down. As for get3DDepth, it throws the error: "[love "callbacks.lua"]:305: Error: main.lua:256: attempt to call field 'get3DDepth' (a nil value) stack traceback: [love "boot.lua"]:439: in function 'get3DDepth' main.lua:256: in function 'draw'

[C]: in function 'xpcall'

"

What was Expected?

Get3D should only return true when the 3d mode is on, and Get3DDepth should give with a value 0-1 the depth slider position.

Code to Reproduce

function love.draw(Screen)
if love.graphics.get3D() then
love.graphics.printf(love.graphics.get3DDepth())
end
end

Console

Nintendo 3DS

Firmware Version(s)

11.15.0-47E (both 3dsxl and new3dsxl)

Custom Firmware Version

Luma3DS v11.0-3gxldr (new3dsxl), Luma3ds v10.2.1 (3dsxl)

Execution Method

Homebrew Menu

Code of Conduct

TurtleP commented 1 year ago

Could you try love.graphics.getDepth()? I believe I had renamed it for 3.0, so apologies on the confusion.

wewewer123 commented 1 year ago

That indeed fixes that issue, but I'm still confused about the Get3D function, does that tell you if it's a 2ds/3ds or if 3d mode is on?

TurtleP commented 1 year ago

Yeah get3D returns whether 3d mode is enabled and set3D can enable/disable it.

wewewer123 commented 1 year ago

Ah, I thought it meant as in 3d slider position, thankyou for clearing that up.

Anyway I'll close this issue now.