wgois / OIS

Official OIS repository. Object oriented Input System

Home Page:https://wgois.github.io/OIS/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement console demo on Mac OS with Cocoa

Ybalrid opened this issue · comments

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

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

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.

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

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

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

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