Commit Graph

32 Commits

Author SHA1 Message Date
GravisZro
9ebd567178 Utilize Windows types
For whatever reason they decided to switch a bunch of Windows types to their
underlying types which causes problems when replacing possibly problematic
32-bit long types. This restores the use of the Windows defined types.
2024-05-22 18:30:56 -04:00
Thomas Roß
56288c819e Merge branch 'main' into win-x64 2024-05-21 00:54:53 +02:00
JeodC
e4e1963364 Get executable path for -useexedir 2024-05-20 11:40:14 -04:00
Thomas Roß
4072dcb3bd
Merge branch 'DescentDevelopers:main' into win-x64 2024-05-17 20:06:34 +02:00
Thomas Roß
6ecafd9e68 [Win,x64] Fixed WinApi types and function calls.
Lots of these truncated 64bit pointer or handle types to 32bit.
2024-05-15 19:52:01 +02:00
Louis Gombert
dc138e4912 Remove DDAccess.h header, and associated DD_ACCESS_RING definition
This definition was used to control the accessibility of some class members, changing protected qualifiers to public. This introduced unnecessary coupling between components and headers.

All conditional access specifiers have been set to public, which should not be a problem given the low number of classes that actually used affected members. Another albeit more complex solution could have been to use friend classes.
2024-05-13 23:21:05 +02:00
Thomas Roß
2809da9a35 [Windows,Mouse] Restricted the mouse movement to the actual window area to prevent accidental focus loss by clicking outside the window. 2024-05-10 17:12:36 +02:00
JeodC
a4ab78192c Join license header with historical commentrs
Join the license header with historical comments using a separator so IDEs can correctly parse the initial header.

Also use .gitattributes to ensure all files are LF.
2024-05-08 14:41:19 -04:00
Edu García
3440667e93 remove unused code (mainly windows.h) 2024-05-07 23:45:33 +01:00
Edu Garcia
553f851714 remove unused code 2024-05-06 22:06:26 +01:00
Jeod
b7202fe924
Merge pull request #291 from JeodC/extramousebtns
Import extra mouse buttons from Piccu
2024-05-06 16:04:41 -04:00
Edu Garcia
a26ced7d4c remove unused serial code 2024-05-06 19:01:48 +01:00
JeodC
481cbc3afe Import extra mouse buttons from Piccu
Import the extra mouse buttons for Windows from Piccu Engine commit 2924ad2. Will help until SDL2 is brought to Windows platform.
2024-05-06 08:35:50 -04:00
Oskar Strengbohm
4582b44eb3 misc: pstring: Refactor dependents. 2024-04-29 10:01:33 +02:00
Ryan C. Gordon
6c8977caf0
Heavy patching for compiler warnings.
The vast majority of this is fixing up `char *` that should be `const char *`
but a handful of other fixes, like potential buffer overflows that GCC
noticed, etc, were applied as well.

This removes `-Wno-write-strings` from CMakeLists.txt, as it is no longer
necessary, as there is no longer a flood of compiler warning spam when
building.

This does not fix all compiler warnings; there are still a handful, and they
are legitimate, but they can be dealt with in a future commit.
2024-04-29 00:18:56 -04:00
Jeod
0ce6b341e5
Merge pull request #188 from tophyr/kill-unused-srcs
Kill unused srcs
2024-04-28 07:23:48 -04:00
Thomas Roß
318a8f6462 [Windows,Mouse] Removed call to DDIOShowCursor() from ddio_MouseMode() so we can set the mode before ddio_MouseInit() gets called and also prevent overrideing the mode always with MOUSE_STANDARD_MODE. 2024-04-27 18:54:07 +02:00
Thomas Roß
e28e4588e5 [Windows,Mouse] Reactivate code to evaluate mouse mode. 2024-04-27 18:43:53 +02:00
Chris Sarbora
e6ba1906c9
Remove MacOS (Classic) code and all references (1/3)
The MACINTOSH define refers to MacOS Classic (not OS X) which we do not
plan to support. Rather than carry the cruft forever, let's delete it.

NOTE: legacy/ is unused but we're keeping it around, so MACINTOSH uses
there are left alone.

Process used for this commit:
```
git rm -r mac
find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" \) \
  -exec unifdef -UMACINTOSH -o {} {} \;
git restore legacy
git add .
```

Test Plan:
On Mac, build both Debug and Release
```
cmake --build --preset mac --config Debug
cmake --build --preset mac --config Release
```
2024-04-27 07:38:14 -07:00
Thomas Otto
00389c50ea Some more CMake white space formatting
- tabs to spaces
 - use Unix line endings everywhere
 - newline at end of file
 - remove trailing white space
 - no space between keywords and opening parenthesis
 - use 2 spaces to indent
2024-04-21 11:46:32 +02:00
Kevin Bentley
1f45163248 Updated source to reflect the license that this code is released under. 2024-04-20 09:57:49 -06:00
Louis Gombert
c2b71b8147 Standardize CMake formatting
lowercase function names, blocks indent
2024-04-20 14:45:49 +02:00
InsanityBringer
0be24877d8 oops, left a comment incompl 2024-04-18 17:54:41 -05:00
InsanityBringer
396131c15b Remove unneded mprintfs 2024-04-18 17:46:20 -05:00
InsanityBringer
766e6420c4 Deregister the raw input device on DDIO shutdown, to avoid excessive capturing of the mouse. 2024-04-18 17:38:29 -05:00
InsanityBringer
991fa75f16 Remove smoothing code that did nothing 2024-04-16 20:44:50 -05:00
InsanityBringer
21a5ff895b Raw input mouse handler 2024-04-16 20:40:15 -05:00
Azamat H. Hackimov
38128ea134 Additional clang-format 2024-04-17 00:25:04 +03:00
Kevin Bentley
61be1317b2 More clanging 2024-04-16 14:46:12 -06:00
Kevin Bentley
7399b5a2f2 Fix CRLF line endings. 2024-04-16 14:21:35 -06:00
Kevin Bentley
c6640cc631 clang-format on everything. 2024-04-16 12:56:40 -06:00
Kevin Bentley
df209742fc Initial import 2024-04-15 21:43:29 -06:00