Sryder
121fcd8369
Fix screenshot functionality in fullscreen in SDL2
2018-03-08 22:28:38 +00:00
Sryder
77af3a8f95
Optimise the screen texture setup for SDL2, Post-processor, and wipes.
...
Only use glCopyTexImage2D when first creating the screen texture, use glCopyTexSubImage2D anytime after that as it does not define a new texture each time.
Flushing of the screen textures has been implemented for when the screen size changes (so that the screen textures don't stay at a wrong size) and the game is closed, I believe they would leave a memory leak before.
2018-03-07 22:55:21 +00:00
Monster Iestyn
4a0305eec8
more I_GetFreeMem fixes: don't attempt to set *total to 0L if total itself is NULL
2018-02-23 20:40:19 +00:00
Monster Iestyn
1216c9da18
Use __linux__ instead of LINUX/LINUX64
...
Turns out compiling for Linux 32-bit using the Makefiles never actually defines LINUX! Apart from that, most of the existing Linux-specific code in SRB2's source code (except for tmap.s) actually uses __linux__ instead anyway
2018-02-23 20:21:16 +00:00
Alam Ed Arias
82f2f2f2f9
SDL: disable check for noreturn
2018-01-04 14:29:29 -05:00
Monster Iestyn
d937f6fc8b
Merge branch '2.1.20-preparation' into 'next'
...
2.1.20 preparation
See merge request STJr/SRB2!215
2017-12-27 16:53:43 -05:00
Alam Ed Arias
a29203acd8
Disable win_dbg
2017-12-26 20:24:08 -05:00
Monster Iestyn
7cb0138293
Change version number to 2.1.20
2017-11-08 15:06:42 +00:00
Steel Titanium
799a819ee9
Merge remote-tracking branch 'upstream/master' into window_center_fix
2017-10-29 00:00:11 -04:00
Monster Iestyn
c90ddbca36
Merge branch 'makefile-ports-tweaks-cleanup-etc' into 'master'
...
Makefile ports tweaks cleanup etc
See merge request !211
2017-09-28 17:31:33 -04:00
Alam Ed Arias
2ccd397d11
Build: kill GCC 7's implicit-fallthrough warning
2017-09-28 09:39:47 -04:00
Monster Iestyn
b040113246
Removed the wrong endif by mistake
2017-09-16 20:59:35 +01:00
Monster Iestyn
a33bb70a0c
Removed all support for Dreamcast, XBox, PSP, PS3, GP2X, Wii, and WinCE from files in the sdl/ folder. If you wanted these ports, use the SDL 1.2 code in sdl12
...
Also removed GP2X setup from sdl/MakeNIX.cfg, use sdl12 for that too
2017-09-16 20:26:04 +01:00
Monster Iestyn
dcb23e01c0
SDL_INIT_NOPARACHUTE does nothing in SDL 2.0, so don't use it anymore
2017-09-15 21:22:28 +01:00
Monster Iestyn
5fb551dd75
Removed 1.2.x version checks in these files, SDL 2.0.x should always have these files
2017-09-15 17:15:06 +01:00
Monster Iestyn
d2a76ca269
Removed references to console ports and WinCE in sdl/Makefile.cfg
2017-09-15 17:12:53 +01:00
Steel Titanium
cf41a11770
Fix for window being offcenter
2017-09-11 16:36:30 -04:00
Monster Iestyn
36977a5eda
SDL_SetRelativeMouseMode(SDL_TRUE) already does what HalfWarpMouse does
...
Also, don't post an ev_mouse event_t if not in relative mouse mode, so the camera doesn't jerk when the mouse enters the window
2017-08-22 22:53:18 +01:00
Monster Iestyn
821a1810f7
Moved lrounding of mouse motion events to the actual point an event is made
...
Also did some cleanup and moving around, as well as adding comments
2017-08-21 21:38:29 +01:00
Monster Iestyn
10cbe2c82b
Turns out the issue was with fullscreen! All I have to do is factor in the resolution/real window size ratio apparently (which was already done before)
...
Also changed movemousex/y to INT32
2017-08-19 22:54:30 +01:00
Monster Iestyn
758e9c4558
Merge all (relative) mouse motion events into one mouse event
...
This fixes SDL2_RelMouse's weaker sensitivity for me on Windows (but apparently not for others??)
2017-08-19 21:39:04 +01:00
Monster Iestyn
2d661fef18
Turns out we don't need to use SDL_SetWindowTitle on its own, since SDL_CreateWindow already deals with the window title anyway. So I've disabled everything related to Impl_SetWindowName for now
...
Also what were you thinking Fury?!? window shouldn't be NULL for SDL_SetWindowTitle, you backwards person you
2017-08-07 16:44:29 -04:00
Alam Ed Arias
35404be1e0
SDL: y input is flipped
2017-08-07 16:37:03 -04:00
Alam Ed Arias
c25b2eb37f
Merge remote-tracking branch 'origin/master' into SDL2_RelMouse
2017-08-07 16:33:39 -04:00
Alam Ed Arias
6be7693ecb
OpenGL: Load the GLU and OpenGL 1.3 multitexturing functions during runtime
2017-05-29 22:52:51 -04:00
Alam Ed Arias
877e9510f7
Update version number to v2.1.19
2017-05-26 21:38:49 -04:00
Monster Iestyn
17a06dd6c4
I_GetConsoleEvents: Split KEY_EVENT code into a function of its own, like with I_GetEvent's event types
...
One benefit of this is that event_t data need only be created if KEY_EVENT is found, since the other event types never do anything anyway
2017-05-15 18:39:59 +01:00
Monster Iestyn
87085f2475
SDLSetMode: merge wasfullscreen/windowed mode code into one block
2017-05-15 16:35:32 +01:00
Monster Iestyn
a340f2c8ed
Impl_CreateWindow: re-use "flags" for SDL_RENDERER_* flags, remove unnecessary curly braces
2017-05-15 16:19:28 +01:00
Monster Iestyn
4979ab6b8e
Not really important or anything, but checking render_soft == rendermode rather than rendermode == render_soft always bugged me. And it's not consistent with the rest of the source code (or at least most of it) anyway.
2017-05-15 15:43:31 +01:00
Monster Iestyn
d1bbd1261e
VID_SetMode: SDLSetMode should use vid.width/vid.height, not windowedModes[modeNum].
...
If modenum was < 0 or >= MAXWINMODES, that would make windowedModes[modeNum] be out of bounds and possibly crash the game.
2017-05-15 15:36:51 +01:00
Monster Iestyn
093800cb06
I_FinishUpdate: OglSdlFinishUpdate should never run for render_soft, even if screens[0] somehow is NULL
2017-05-15 15:24:40 +01:00
Monster Iestyn
b8ffeeb59f
Update version number to v2.1.18
...
Don't worry, I remembered to update MODVERSION as well this time :)
2017-05-12 16:06:27 +01:00
Monster Iestyn
e59fb38802
Update version number
2017-01-15 18:49:33 +00:00
Monster Iestyn
ae3e11369e
Revert "(Messiness warning) attempt to start using SDL_SetRelativeMouseMode instead of the old hacks of making the mouse do movement without leaving the window and be hidden"
...
This reverts commit 347b531881
.
(Too experimental, may end up adding new bugs; let's just keep it to clean up for now)
2016-11-30 17:21:28 +00:00
Monster Iestyn
347b531881
(Messiness warning) attempt to start using SDL_SetRelativeMouseMode instead of the old hacks of making the mouse do movement without leaving the window and be hidden
...
Seems to work so far though
2016-11-25 21:13:39 +00:00
Monster Iestyn
8bbbeff2a9
Make Impl_SDL_Scancode_To_Keycode look a bit neater
...
This way it's easier by eye to see from the list which SDL scancode maps to which SRB2 key code
2016-11-23 17:08:37 +00:00
Monster Iestyn
5cf4767aed
Clearing away lots of disabled code (some of it would no longer work on SDL2 anyway)
2016-11-23 16:51:37 +00:00
Monster Iestyn
153ba39f19
Remove remnants of SDLK_ stuff, we use scancodes now not keycodes
...
(Apparently SDLK_LMETA/SDLK_RMETA don't exist anymore in SDL2 anyway?)
2016-11-22 22:41:02 +00:00
Monster Iestyn
1606a45b18
Some cleanup/reorganisation in SDLSetMode and Impl_CreateWindow
2016-11-21 22:07:05 +00:00
Monster Iestyn
208546165b
Comment out SDL2STUB from Impl_SetWindowIcon
2016-11-21 20:59:44 +00:00
Monster Iestyn
168f8d5c5e
Un-stub Surfaceinfo and just print the parts that still work in SDL2
...
This means the console command vid_info also works properly too now (well, it does nothing in OpenGL mind)
2016-11-21 20:40:02 +00:00
Monster Iestyn
f4705b01f4
Don't call SDLESSet
...
Turns out sdl12's version of this function only did stuff for DC/GP2X ports; support for them have been cut out for SDL2, so for now let's just not use the function at all
2016-11-21 19:42:39 +00:00
Inuyasha
e245cdfcbf
Console with moving cursor, selections, etc
2016-11-03 17:30:30 -07:00
Inuyasha
bb20cfd6be
Clipboard copy/paste testing
...
(unfinished, but basics work)
2016-11-03 01:43:57 -07:00
ilag11111
c977d17416
Prevent truncation when resampling sounds with non-multiples of 11250.
2016-09-11 09:41:18 -07:00
Alam Ed Arias
5c234a817a
Merge branch 'master' into next
2016-07-21 18:49:33 -04:00
Alam Ed Arias
9301344003
Merge branch 'macosx-hacking' into 'master'
...
OS X Makefile build setup
This merge request:
* Cleans up the OS X bundle resource location code and fixes a SIGSEGV and memory leak
* Simplifies and fixes the OS X desktop alert code, closing more leaks
* Adds the MACOSX build flag to the Makefiles, to allow building a binary (but not Mac app yet) of SRB2.
This is intended to make it easier for developers to build on Mac OS X, without having to pull in all of XCode. You can keep using CMake if you prefer.
To test, use `make -C src MACOSX=1 NONX86=1 SDL=1 NOASM=1` for a release build.
Left to do:
* Add a content bundling script to be run after building, and a flag to trigger doing that.
`MACOSX_BUNDLE` maybe?
* Somehow get access to a Mac running PowerPC and figure out how to build a multi-platform binary.
* Add the proper magic to compile using gcc if requested. (Right now, compilation is done via LLVM/Clang)
See merge request !72
2016-07-21 15:38:46 -04:00
Alam Ed Arias
1a0fcbd8dc
Revert "Merge branch 'RemoveINetC' into 'master'"
...
This reverts commit 8607f5247c
, reversing
changes made to 11d76a6562
.
2016-07-21 14:42:00 -04:00
Alam Ed Arias
8607f5247c
Merge branch 'RemoveINetC' into 'master'
...
Remove i_net.c
The code in i_net.c doesn't actually seem to be used in SRB2. I was able to compile a build without it, and hosting and joining netgames worked just fine (well, as fine as they can with the current state of the netcode...).
The vast majority of code in the file seems to be contained in HAVE_SDLNET ifdefs, and I'm pretty sure SRB2 has never used SDLNET in a public build. The only bit not contained in that block is I_InitNetwork(), which just prints an error and returns false.
Do we really need to keep it around? If not, I say get rid of it. It seems like useless clutter that is just going to confuse people who are trying to understand the source code.
See merge request !73
2016-07-21 14:15:58 -04:00