wgois / OIS

Official OIS repository. Object oriented Input System
https://wgois.github.io/OIS/
zlib License
254 stars 87 forks source link

Implement console demo on Mac OS with Cocoa #35

Open Ybalrid opened 6 years ago

Ybalrid commented 6 years ago

The console demo doesn't run on Mac OS X. Need to investigate.

Ybalrid commented 6 years ago

Looking at the demo code, the initialization of a window is never actually done, and the Mac OS code is #ifdef-ed out.

Ybalrid commented 6 years ago

Removing the check for 64bit that undefined the initialization, and replacing the carbon-based code that create a window to the initialization of a Cocoa NSApplication and NSWindow seems to get something working.

The application can't terminate on it's own when you hit Q or ESC, but it's not crashing, and the events are shown int the console.

vmware_2018-03-25_23-49-13

The quit problem seems fixable, the mouse cursor seems to be hidden by default, and the code that prints event on the console only prints a raw integer value when it gets an event. Other than that, everything seems to be working flawlessly.

Ybalrid commented 6 years ago

See commit f8637a82388e1ee2fdf3e40796417211e234ed74

Ybalrid commented 6 years ago

Have to say that anybody with actual knowledge of Objective-C(++) and Cocoa are welcomed to help ;-)

Ybalrid commented 3 years ago

For other reasons, I have recently acquired an actual mac. Gonna be able to dive into this a bit more

kagurazaka-ayano commented 7 months ago

Any update on this? When I run the demo the FFConsoleApp results in a seg fault and the ConsoleApp makes my mouse disappear as soon as the console window get selected. my OS detail:

OS: macOS 14.2 23C5030f arm64
Host: Mac14,5
Kernel: 23.2.0
Uptime: 10 days, 8 hours, 23 mins
Packages: 219 (brew)
Shell: zsh 5.9
Resolution: 1800x1169, 1366x1024
DE: Aqua
WM: Quartz Compositor
WM Theme: Graphite (Dark)
Terminal: iTerm2
Terminal Font: CaskaydiaCoveNFM-Regular 14
CPU: Apple M2 Max
GPU: Apple M2 Max
Memory: 10783MiB / 65536MiB
Ybalrid commented 7 months ago

No work has touched Mac support in years. Help is welcomed on that front!