libxmp / xmp-cli

Command-line mod player using libxmp
GNU General Public License v2.0
75 stars 22 forks source link

Player controls do not work in MSYS2. #32

Closed AliceLR closed 1 year ago

AliceLR commented 3 years ago

xmp playback works fine in my MSYS2 environment, but when I press any keys that should affect playback control, they are ignored. I haven't looked very deep into whatever might be the cause of this issue.

AliceLR commented 2 years ago

The cause of this issue is _kbhit and _getch only work in terminal programs (the keys work fine in both cmd and PowerShell) and MinTTY is a GUI terminal emulator. I haven't found a workable Win32 solution yet.

There are Cygwin hacks, but xmp might need to be built under MSYS instead of MINGW64 to enable them. Using them as a fallback to _kbhit and linking -lws2_32 compiled in MINGW64 but it didn't work.

edit: to be clear, I found a reliable workaround for this issue (start cmd //c xmp girl_from_mars.xm) that I can use when I need the controls, so this isn't quite as bad as it initially seemed.

sezero commented 1 year ago

There are Cygwin hacks, but xmp might need to be built under MSYS instead of MINGW64 to enable them. Using them as a fallback to _kbhit and linking -lws2_32 compiled in MINGW64 but it didn't work.

Win32 select function use (winsock, that -lws2_32) won't ever work as its posix counterpart: it only works on network handles, not file handles - only cygwin-specific select is posix compatible.

edit: to be clear, I found a reliable workaround for this issue (start cmd //c xmp girl_from_mars.xm) that I can use when I need the controls, so this isn't quite as bad as it initially seemed.

Can this be closed or is there something better to do here?

sezero commented 1 year ago

@AliceLR: PING?

sezero commented 1 year ago

Closing, because there exists a workaround already.

AliceLR commented 1 year ago

Also, this seems to have been fixed in MSYS2 at some point.