Commit Graph
5066 Commits
Author SHA1 Message Date
Tommy Li aae68b4b72 Add a draft for NSEvent based keyboard input. 2019-12-22 21:21:18 -06:00
Tommy Li 6b524a6c1f Add CMake instructions to copy default resources to app bundle, and add mounting points for those resources. 2019-12-22 21:20:57 -06:00
Tommy Li 17255a69a2 Merge remote-tracking branch 'origin/5_1-new' into catalina-workaround 2019-12-22 12:58:00 -06:00
Tommy Li d8acd46319 More synchronous call to the main thread to avoid crashes 2019-12-22 12:56:39 -06:00
Prcuvu 123b01930e Force Lua to be compiled as C++ code when using MSVC
The setjmp/longjmp error handling mechanism may fail with Microsoft C++ since
they utilize the same stack-unwinding mechanism with C++ exception handling.
Lua calling longjmp after luaD_rawrunprotected returns causes unpredictable
behaviour. On Windows x64 build, this causes lua_error to crash the whole
StepMania program.

Lua provides the same macros to utilize C++ throw/catch, which effectively
solve the problem. Just specify Lua library as C++ code to enable them.

Reference: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/longjmp
2019-12-22 18:38:07 +08:00
dinsfire64 95122bbccb restore autogen lights 2019-12-16 20:44:02 -06:00
Matias Hilden cb10b61d34 fix leftover macro loop in JACK sound driver 2019-12-08 13:52:07 +02:00
tommy.li 81a041e3dd "Fixed" some Objective-C API issues blocking the game from launching 2019-11-16 00:31:47 -06:00
Martin NatanoandColby Klein c5096d24de Update vertex count stats when drawing smooth lines (OGL) (#1932)
The statistics are updated in the generic codepath, which is not used by
RageDisplay_Legacy::DrawLineStripInternal() when rendering smooth lines.

Note, that the output vertex count can differ a lot between smooth lines
(2) and non-smooth lines (~38 output vertices per input vertex), so
updating the statistics can not be done in RageDisplay::DrawLineStrip()
like it is donw for the other draw functions.
2019-11-14 12:40:35 -08:00
Martin NatanoandColby Klein 7dae1384e6 Sort input devices on Linux (#1926)
* Remove unused function

* Sort input devices on Linux

The readdir() function doesn't guarantee any specific ordering, so the
numbers of joysticks might change when restarting StepMania.
(Empirically this usually only happens after a reboot.)

Let's sort the input devices alphabetically before opening them to have
more consistent numbering and avoid annoying remapping of controllers.
2019-10-29 08:05:29 -07:00
Elias KunnasandColby Klein 0bd2365ebc Use libXtst again with CMake (#1908)
* Use libXtst again with CMake

It seems that Xtst was never used after the transition to CMake.

This is related to https://github.com/stepmania/stepmania/issues/1902.

* Travis: install libxtst-dev
2019-10-24 08:22:42 -07:00
Elias Kunnas 1099c8297a Fix LRC parsing crash for unrecognized values 2019-10-23 20:54:14 +03:00
Prcuvu 333abe5934 Upgrade to libtomcrypt 1.18.2 2019-10-15 17:43:01 +08:00
Tracy WardandGitHub 81ce0e94d9 Merge: Windows x64 build support (#1899) 2019-10-13 15:56:04 -04:00
Tracy WardandGitHub a5a4bb5827 Add support for Raw Thrills I/O (DDR X2 US cabinets) on Windows (#1894) 2019-10-13 03:59:35 -04:00
Tracy WardandGitHub 04f7a8c466 Rewrite BG/FG changes parsing (#1916)
* Handle commas and equals in BG/FG change tags

Rewrote parsing of BGCHANGES and FGCHANGES tags to be able to
handle people putting commas and equals in the filenames. For the
value positions which can be filenames, check to see if we can
recognize any filename from the song directory followed by a comma,
equal, or end of string. If we can, use that. If not, just treat it
the same as before, looking for the next comma or equal.
2019-10-12 11:41:39 -04:00
Tracy Ward f104e813c4 Delay writing image cache index until after load complete
While loading all songs, disable writing the index file for the image
cache, in order to speed up loading and cache generation, similar to
how the song cache index file write is delayed.
2019-10-12 11:24:13 -04:00
PrcuvuandGitHub 44b76446bb Merge branch '5_1-new' into win64 2019-10-06 00:55:50 +08:00
Tracy WardandGitHub 7ae3cfe99c Remove dependency on DirectX SDK (#1905)
Backport removal of DirectX SDK requirement
2019-10-05 10:35:37 -04:00
x0rbl 77e2776dad Raw Thrills I/O: Add support for the physical coin counter inside the coin door 2019-10-04 17:44:32 -07:00
Prcuvu b1e5d9f46d A missing data type to change 2019-10-05 05:34:06 +08:00
Prcuvu 96db8d3be7 Update VDI format for Windows x64
Update VDI format to utilize 64-bit pointer types for stack tracing.
Revise mapconv and CrashHandlerChild.
Tested on both 32-bit and 64-bit builds to be working properly.
2019-10-05 05:08:20 +08:00
Tracy Ward d7f9c8d7b6 Remove more DX CMake bits
There is also a weird bit in here that seems like it should be
whether to use system or included libpng, but it actually does
the directx include dir on one side.
2019-10-04 11:34:24 -04:00
Tracy WardandColby Klein 8e7c4df49c backport legacy credits from master (#1906)
* Restore lost Stepmania Team credits

Back in 2009, an overhaul was made to the theme to replace the credits
screen. That new screen had a short list of credits, along with a note to
"remake this list". That never happened, and over time, the original credits
list was lost in the shuffle. People that worked on Stepmania in the past,
who felt their contributions were enough to warrant credit, should still
get credit.

This list was pulled directly from the git history under hash
fb1165e6be
It could probably be cleaned up a bit. (For instance, the theme has been
completely redone. Should we still include the Graphics and Theme sections?
Also, the web section. And the thanks section? Those are pretty much just
shoutouts.)

* Name change. Deal with it >8)

* Change encoding of restored credits to utf-8

The list used "fancy" quotes. I should have saved this at utf-8 to
begin with.
2019-10-04 07:37:07 -07:00
Tracy Ward c1e4d56f5e Fix indentation in CMakeData-os.cmake 2019-10-04 09:53:20 -04:00
Tracy Ward 626e58700e Fix build errors with IH_DirectInput using the Win SDK
* dxguid.lib no longer exists.
* older SDKs (like the v140_xp toolset) don't provide XUSER_MAX_COUNT.
2019-10-04 09:46:51 -04:00
Tracy Ward 2bce815a1a Fix build errors with RageDisplay_D3D using Windows SDK
Also: Implement d3d9 screenshots without d3dx9

This only implements the two most likely surface formats. Does anybody
actually use 16-bit rendering anymore? (If yes, I'll do the slower path
through StretchRect to convert)

(backport from master, where it was two commits)
2019-10-04 09:35:44 -04:00
Tracy Ward 6aedffabf3 Add GetErrorString to DirectXHelpers; Add error list
* Another thing lost was DXGetErrorString. Re-implement it.
* Include a partial list of errors.

(backported from master, where it was two commits)

Note: If we ever drop support for windows older than win8, we can
remove this and just call FormatMessage.
2019-10-04 09:29:01 -04:00
Tracy Ward e9ca966af7 Allow CreateScreenshot to return nullptr
RageDisplay_D3D::CreateScreenshot will be returning nullptr until I get
around to re-implementing it without using d3dx, which is another thing that
did not make the move into the Windows SDK.

(backport from master)
2019-10-04 09:00:24 -04:00
Tracy Ward dce0d0f91c Fix potential security issue with FormatMessage use
From MSDN:

Security Remarks
If this function is called without FORMAT_MESSAGE_IGNORE_INSERTS, the
Arguments parameter must contain enough parameters to satisfy all insertion
sequences in the message string, and they must be of the correct type.
Therefore, do not use untrusted or unknown message strings with inserts
enabled because they can contain more insertion sequences than Arguments
provides, or those that may be of the wrong type. In particular, it is
unsafe to take an arbitrary system error code returned from an API and use
FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS.

(backport from master)
2019-10-04 08:58:05 -04:00
Tracy Ward dfb524a547 Fix incorrect usage of GetLastError in LLW_Win32
GetLastError must be called before any other function which could possibly
change it, otherwise we will lose the error code.

(backport from master)
2019-10-04 08:56:03 -04:00
Tracy Ward cdc4bd9da2 Replace missing dxguid.lib functionality
One thing that did not make it into the move to the Windows SDK is the
dxguid.lib library, which defined the IIDs for all of the DirectX interfaces.
This replaces that, defining the ones we use. Currently, we only need to
define the DirectInput IIDs, so that is all that is here.

(backport from master)
2019-10-04 08:48:19 -04:00
Prcuvu 2a8ca62ba6 CrashHandlerChild rva type fix 2019-10-04 15:41:05 +08:00
Prcuvu 4baa25710d Create a thread for exception handler for separate stack 2019-10-04 15:28:17 +08:00
Prcuvu 31604f48ce Use static array for new stack instead of calling VirtualAlloc 2019-10-03 14:01:59 +08:00
Prcuvu 1fa9bb387c Fix for *nix build 2019-10-03 12:17:53 +08:00
Prcuvu dea6917f02 Explicitly expand size_t on min and max overload 2019-10-03 09:44:07 +08:00
Prcuvu 4026d41c16 More Windows API type inconsistency fix 2019-10-03 09:33:27 +08:00
Prcuvu 54c067f48d Fix Windows x64 type inconsistency regarding RageTexture 2019-10-03 08:58:14 +08:00
Prcuvu 7e96188088 Reserve register parameter stack space for MainExceptionHandler
Windows x64 functions always assume there is at least 4 QWORDs' length of space
reserved for register parameters (RCX, RDX, R8 and R9) after the caller return
address even though there are less than 4 parameters. MSVC compiler will try to
utilize vacant space there. If we forget to reserve that block, the exception
handler will abort.

Reference: https://docs.microsoft.com/en-us/cpp/build/stack-usage
2019-10-03 04:51:08 +08:00
RhythmLunatic 63735535bf Fix pump couples mode 2019-10-02 11:07:47 -05:00
dguzekandGitHub 17135e0e21 Merge pull request #1868 from RhythmLunatic/mainline
Support any size splash on linux (Again)
2019-10-02 10:18:13 -04:00
Prcuvu 1dc2c9cc1f Fix indentation [ci skip] 2019-10-01 18:09:22 +08:00
Prcuvu d63957ed0b Fix CMake syntax 2019-10-01 16:48:00 +08:00
Tracy WardandPrcuvu 60d6ebce92 replace "asm nop" with an intrinsic in msvc
MS is deprecating inline assembly, and has completely removed it from
the x64 compiler. The solution is to use compiler intrinsics. This will
hopefully make building for x64 easier in the future. (I might even
spend some time attempting to build it for x64).
2019-10-01 15:04:16 +08:00
Prcuvu 67ebec3320 Do not specify /arch:SSE2 to silence a MSVC warning 2019-10-01 15:03:21 +08:00
Prcuvu ef4376cb6e Implement a working CrashHandler::ExceptionHandler for Windows x64 2019-10-01 14:56:09 +08:00
Prcuvu 3cd1bdcc8f Add WinDDK x64 libraries 2019-10-01 14:45:55 +08:00
Prcuvu b9a4d71c23 Add FFmpeg 2.1.3 Windows x64 libraries and auto copy binaries on configuration 2019-10-01 14:37:46 +08:00
Prcuvu 4f864911fc Use SetClassLongPtr compatible for both Windows x86 and x64 2019-10-01 14:14:38 +08:00