Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL2 compilation in macOS fails with a single error. #54

Closed
Art10001 opened this issue Jul 4, 2018 · 13 comments
Closed

SDL2 compilation in macOS fails with a single error. #54

Art10001 opened this issue Jul 4, 2018 · 13 comments

Comments

@Art10001
Copy link

Art10001 commented Jul 4, 2018

../network/net.c:68:10: fatal error: 'linux/if.h' file not found

In the network directory, there are the following files: lgy98.c lgy98.h lgy98.o lgy98dev.h net.c net.h readme.txt but no if.h.

EDIT: if.h exists under <net/if.h>, if_ether.h under <netinet/if_ether.h> but if_tun.h does not seemingly exist.

EDIT2: added where if_ether.h is located at and a clarification.

@Art10001 Art10001 changed the title SDL2 compilation fails with a single error. SDL2 compilation in macOS fails with a single error. Jul 4, 2018
@AZO234
Copy link
Owner

AZO234 commented Jul 5, 2018

NP2kai does not support SDL2 build on Mac.
I do not know how to build and necessary libraries.

According to your report, dependency of header file seems to be complicated.
I am sorry, but I will not correspond.

Thanks.

@AZO234
Copy link
Owner

AZO234 commented Jul 7, 2018

I added Makefile.mac.

$ make -f Makefile.mac
then maked np2kai executable file.
(You can use Makefile21.mac too.)

Please try it.

@Art10001
Copy link
Author

Art10001 commented Jul 7, 2018 via email

@Art10001
Copy link
Author

Art10001 commented Jul 8, 2018

@AZO234 , the compilation works, the executable runs, but the button to show GUI is used by the "Show Desktop" function of Mission Control (an hotkey that shows the desktop quickly).

I changed the binding, and the GUI works, but the mouse can barely move, as the instant it moves it is locked back to the center of the window.

@AZO234
Copy link
Owner

AZO234 commented Jul 9, 2018

There was a report on RetroArch of Mac that mouse operation is not good.
Is it a problem with SDL?

About the header file of the network, it seems that it is not just the difference of the directory.
Another implementation is required.

I was informing RA developers,
I currently refraining from developing NP2kai for health reasons.
I'm sorry, I don't have the power to solve problems now.

Regard.

@bmosley
Copy link

bmosley commented Jul 10, 2018

I changed the binding, and the GUI works, but the mouse can barely move, as the instant it moves it is locked back to the center of the window.

I'm experiencing the same issue. building from source (no x11) The mouse resets back to center when attempting to select GUI menu. Unable to use

@AZO234
Copy link
Owner

AZO234 commented Jul 11, 2018

Since I do not own a Mac,
I operated macOS with a simulator and confirmed the build of NP2kai.
However, it has not been sufficiently inspected until operation.

The mouse cursor is not fixed in the center.
But there seems to be a problem with GUI operation as well.
It will take time to fix it.

@bmosley
Copy link

bmosley commented Jul 12, 2018

Are there hotkeys or keyboard shortcuts to use as workaround?

@AZO234
Copy link
Owner

AZO234 commented Jul 12, 2018

The GUI key of NP2 is currently assigned to F12 key.
When using on a Mac, which key should I assign?

@bmosley
Copy link

bmosley commented Jul 12, 2018

i think F12 is fine for GUI. Is there a modifier key to select one of the gui menu items without using mouse? like ALT or so?

@AZO234
Copy link
Owner

AZO234 commented Jul 12, 2018

I examined it in detail.
When clicking the mouse, the coordinates pointed to the center of the screen.
I finally understood the problem.

I changed the coordinates when moving the mouse and use that coordinates when clicking.
I loaded FD and HDD and confirmed that the game can operate.

np2mac

@bmosley
Copy link

bmosley commented Jul 13, 2018

Excellent AZO! I’ll pull change and compile tonight

@Art10001
Copy link
Author

Since this seems to be solved... I close it. Thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants