Commit Graph
141 Commits
Author SHA1 Message Date
phantom10111andteejusb 9a55cb99c1 Windows: Add manifest with UTF-8 code page specification
On Windows 10 versions starting with 1903, this manifest will allow Win32 -A
family of functions to accept UTF-8 strings as arguments.
2024-04-12 22:40:09 -07:00
phantom10111andteejusb 7dd50cf995 Windows: Generate version number in resource file
Windows executable had an old version number hardcoded in the resource file.
Automatically generate a file with correct version set.
2024-04-12 22:40:09 -07:00
glitchbearandteejusb ad5f3e0653 Windows support for fullscreen borderless window mode 2024-03-02 23:47:12 -08:00
Martin Natano 56edcee48c Use compiler intrinsics for byte swapping 2023-04-21 22:13:41 +02:00
Martin Natano bacecae1f7 Decouple <vector> 2023-04-21 22:13:41 +02:00
Martin Natano aa87f85eef Decouple <cstdint> 2023-04-21 22:13:41 +02:00
Martin Natano 78fb2e9fc3 Decouple <cstddef> 2023-04-20 11:21:29 +02:00
Martin Natano 093675cdc3 Use attributes where possible 2023-04-20 11:21:29 +02:00
Martin Natano b68ca517e6 Clean up math functions
- Remove checking for standard functions from the build system
- Prefix all invocations with std::
- Replace suffixed functions with unprefixed versions
- Include <cmath> in all files that use it and remove the global include

e.g. floorf(x) -> std::floor(x)
2023-04-19 19:31:40 +02:00
Gareth Francisandteejusb f39ed52dbf Remove calls to dwmFlush - Were never called before and cause frame drops with opengl renderer 2023-03-29 13:01:01 -07:00
Brian Phlipotandteejusb 4a6b1a743c Enable more compiler warnings and treat them as errors. 2023-02-02 11:54:17 -08:00
Michael SundqvistandMartin Natano 0cba3579de Remove global "using namespace std;" declarations, use "std::" prefixes on all std elements
Fix whitespace changes
2022-07-31 22:14:38 +02:00
Martin Natano 1010798e26 Update logo 2022-06-29 21:15:43 +02:00
Martin Natano c40985122e Remove workarounds for ancient MSVC versions 2022-06-07 22:49:05 +02:00
Martin Natano 838de6fb81 Remove support for mingw
MSVC works fine and the bundled mingw libraries are outdated.
2022-06-07 22:49:05 +02:00
teejusbandMartin Natano 8612d34283 Prevent hanging when going into "Graphics Options"
Remove calls to ChangeDisplaySettingsEx(CDS_TEST). This prevents an an alarming system hang on NVIDIA GPUs with DisplayPort displays when using "Graphics Options" in the system menu, and doesn't seem to have any downsides as far as I can tell.

Taken from: https://github.com/ClubFantastic/stepmania/commit/46061f818d020138eff80ba5785e0ea88cd68dfd
2022-06-06 11:23:49 +02:00
Martin Natano 327278436d Remove support for building with system libraries 2022-05-31 18:21:35 +02:00
Martin Natano ee65b7b0c4 Replace logo and clean up packaging 2022-05-21 10:05:44 +02:00
Martin Natanoandteejusb 02008eb469 Rename to ITGmania
- executable name:
  - linux: itgmania
  - windows: ITGmania.exe
  - macOS: ITGmania.app
- config path:
  - linux: ~/.itgmania
  - windows; %AppData%\ITGmania
  - macOS: ~/Library/Application Support/ITGmania
2022-04-02 20:14:57 -07:00
PrcuvuandGitHub 44b76446bb Merge branch '5_1-new' into win64 2019-10-06 00:55:50 +08: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 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 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 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 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 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
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 4f864911fc Use SetClassLongPtr compatible for both Windows x86 and x64 2019-10-01 14:14:38 +08:00
Prcuvu e5321deed4 Fix DLGPROC prototype 2019-10-01 14:10:56 +08:00
teejusb f08d7d9f68 Fix some incorrect typing with the NULL->nullptr conversion for Windows 2019-06-22 23:16:10 -07:00
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -07:00
Drew BarbarelloandColby Klein 557be7cf1b 5 1 new backport x11 fs rework (#1485)
* Use XRandR 1.2 to set fullscreen resolution for single output

Squash of roothorick's PR #497
(also includes Kyzentun's CMake changes from PR #716)

* Cherry-pick json c++1x stuff (b9e3d7174e)

* Cherry-pick c++11 support from 5bba5c0038 and 9f8b045309

* rework Linux (X11) fullscreen, improve display-related Graphics Options

Implement option to select between monitors for exclusive fullscreen mode
on X11 (using XRandR 1.2), or use a fullscreen borderless window.

Reimplement resolution/refresh rate/display mode-related option rows
using Lua, update choices dynamically so only known-good groupings of
resolution/refresh rate/aspect ratio can be selected.

Minimally update Windows/MacOS LowLevelWindow implementations to support
changes made for Linux side. Fullscreen Borderless Window/multi monitor
support from X11 not implemented for those in this commit.

* allow forcibly disabling xinerama use on Linux

When libXinerama is available, SM tries to use it to find the proper
monitor indexes to use to set _NET_WM_FULLSCREEN_MONITORS (on borderless
fullscreen). xfwm4 seems to assume that monitors are numbered in increasing
order from left to right (rather than using the Xinerama-assigned numbers),
so _NET_WM_FULLSCREEN_MONITORS misbehaves on Xfce.

This commit bypasses use of libXinerama, and instead forces SM to induce fullscreen
on the desired monitor in the backup, hacky way: remove all window hints, move window
to desired monitor, then add _NET_WM_STATE_FULLSCREEN hint. This works on
mutter and Xfce.

* Remove multiple warnings on redundant define.

This used to be hard-coded due to pthread related items, but now it's dynamically determined.

* fix _fallback menu behavior for unrecognized aspect ratios

* Fix error recreating existing FS texture

* Bump deployment target to 10.7 to use libc++ on XCode 8

* Add explicit casts to please clang

* Update changelog
2017-06-18 08:55:16 -07:00
Chris PableandColby Klein 55281cebd2 keep xp on life support a bit longer, check for vista+ stuff (#1456) 2017-05-25 00:34:33 -07:00
Colby Klein c5f51d1e5a Call DwmFlush on VSync (might help with stuttering). Note: Requires Windows Vista or later. 2017-05-24 03:37:25 -07:00
Kyzentun Keeslala 79f4037088 Changed GetDisplayResolutions on Windows to ignore modes with less than 32bpp and not test modes that have already been tested. Changed ScreenOptionsMasterPrefs to cache the resolutions list once when the screen starts instead of fetching it multiple times. 2016-01-14 16:33:19 -07:00
Jason Felds d9a3c9cf97 Use cmake to determine which string func we need.
On a side note, better to default to linux names when possible.
2015-10-07 19:00:16 -04:00
Jason Felds 99b79e5410 Generate verstub.cpp through raw cmake.
There is no need for an extra program.

As a bonus, generate a consistent windows vdi file.

There is still an issue with actually *reading* the vdi, but that's for someone else to tackle.
2015-10-02 21:56:02 -04:00
Jason Felds b3a5a82b5c Bring us closer to working with MinGW again.
The biggest obstacle right now deals with FFMPEG. I insist on being able to utilize the git clone/submodule (5_1_0) section. I'm just struggling with the commands.

As part of this commit, some linux files are restored in the compilation chain. This is for consistency with the old Makefile approach.

Assistance will be needed at this point to complete MinGW support.
2015-09-27 17:07:15 -04:00
Jason Felds 537af8d866 Remember to fill in new char's.
...we seriously need to use a standard <string>.

*glares at Yaniel*
2015-09-26 21:03:46 -04:00
Jason Felds 8512665f27 NOW all of the buffer calls should be dead. 2015-09-19 20:06:33 -04:00
Jason Felds 4feddab08e Allow VS2015 to compile StepMania. 2015-09-14 22:45:56 -04:00
Jason Felds e093d204c8 Use proper cmake detection of features.
This attempts to organize all needed items and places appropriate defines
in a single location. Redundant comparisons/defines were removed when noticed.

A few caveats, however:

* This may be better targeted towards the 5_1_0 branch instead of master right now.
* Cmake will run a little slower on configuration/generation now. That's due to the sanity checks it runs.
* There are some more checks to be added later, but this should be a solid start.

Thanks to the [libical](https://github.com/libical/libical) project for inspiration.
2015-09-05 10:51:17 -04:00
Prcuvu 2ff411c7fc Use Visual Studio implemented functions. 2015-09-01 12:21:11 +08:00
Jason Felds dc94728628 Introduce cmake (min 2.8.12) to StepMania.
tl-dr: view the Build directory to see.

This is intended to replace the project files that we presently maintain
so that only a single set is needed instead of multiples.

The following setups were used for testing:

* Windows 8 and Visual Studio 2013 Desktop Express
* Windows 7 and Visual Studio 2012
* Mac OS X Mavericks and Xcode
* Ubuntu and makefiles
* Fedora 21 and makefiles

All three operating systems can generate projects, compile, link, and
run. Windows and Mac OS X users will find their compiled binary in the
same location as before, but Linux users will be surprised: it goes
straight into the root directory, along with a symlinked GtkModules.so
as appropriate. There is no more need for a manual symlinking step.

Known issues:

* At this time, MinGW likely does not work. Extra time will be needed.
* The WITH_JPEG option may go away, and we'll just always require it.
* Some linux libraries can use the system equivalents, but that is not up yet.

For more information, check out the Build directory.
2015-03-21 20:15:15 -04:00