Commit graph

744 commits

Author SHA1 Message Date
drfrag
45abf1a5c9 - Added support for up to 4 DirectInput joysticks at the same time for fake splitscreen. But with more than 32 buttons per device they will overlap as before and you'll get wrong labels. 2019-08-21 14:06:29 +02:00
alexey.lysiuk
95f0f7eadd - cleaned up language detection leftovers
# Conflicts:
#	src/posix/sdl/i_system.cpp
2019-07-17 18:14:53 +02:00
drfrag
c3482b75fc - Make joystick input in the background CVAR controlled. 2019-07-03 20:52:03 +02:00
Magnus Norddahl
fc38b6bbf9 - fix querying for the wrong interface when the UNICODE define is set 2019-06-30 21:41:28 +02:00
Magnus Norddahl
36b7a7d189 - remove dead code 2019-06-30 21:41:25 +02:00
drfrag
ed0890c7b6 - Allow acquiring DirectInput joysticks in the background for fake splitscreen. 2019-06-28 02:47:42 +02:00
Magnus Norddahl
4cd535b3b6 - add vid_hdr cvar that enables higher than 8bpc output for monitors that support it
# Conflicts:
#	src/v_video.cpp
#	src/win32/win32glvideo.cpp

# Conflicts:
#	src/gl/renderer/gl_postprocess.cpp
2019-06-20 20:48:42 +02:00
Christoph Oelckers
b473fc936c - consolidated the 3 atterm implementations.
Each platform had its own copy. Why?

# Conflicts:
#	src/CMakeLists.txt
#	src/dobjtype.cpp
#	src/g_mapinfo.cpp
#	src/g_statusbar/sbarinfo.cpp
#	src/i_net.cpp
#	src/menu/menudef.cpp
#	src/p_setup.cpp
#	src/posix/cocoa/i_video.mm
#	src/posix/i_system.h
#	src/posix/sdl/i_main.cpp
#	src/r_utility.cpp
#	src/s_advsound.cpp
#	src/s_sound.cpp
#	src/v_video.cpp
#	src/win32/i_input.cpp
#	src/win32/i_system.h

# Conflicts:
#	src/CMakeLists.txt
#	src/doomtype.h
#	src/i_net.cpp
#	src/posix/sdl/i_system.cpp
#	src/win32/i_system.cpp
#	src/win32/win32video.cpp
2019-06-10 20:52:02 +02:00
drfrag
dd4807a6ee - Added new great icons by Tormentor667. 2019-05-30 00:05:02 +02:00
Christoph Oelckers
52b8c02fdf - use the Unicode version of GetCommandLine for the crash log. 2019-05-14 19:09:24 +02:00
alexey.lysiuk
d85fb785eb - fixed missing command line in crash reports
https://forum.zdoom.org/viewtopic.php?t=64149
2019-05-14 19:09:22 +02:00
Christoph Oelckers
f026198a8d - set a Unicode capable font for the Windows console.
The default raster font only contains the OEM 437 code page which is quite useless.
2019-05-14 18:42:33 +02:00
Christoph Oelckers
b14a48d2dc - fixed Windows startup.
* the window class name was still ASCII, thanks to some totally pointless and ultimately dangerous type cast to LPCTSTR which rendered all type checks ineffective.
* use wWinMain instead of WinMain so that a Unicode argv gets created. For whatever reason, the ANSI startup leaves this variable empty.
* added a 'disablecrashlog' CCMD for Windows. It is a lot more useful with a debugger present to get the standard crash notification from the system which allows opening a debugger than the crash log and no option to open a debugger.
2019-05-14 17:20:30 +02:00
Christoph Oelckers
163d3395b8 - fixed crash log display.
This still contained pieces where a multibyte string was passed through SendMessage and WM_SETTEXT. All these have been replaced with SetWindowTextW.
This commit also removes the never used crash log upload code and all associated assets because it is extremely unlikely that such a feature will ever be implemented.
2019-05-14 17:20:17 +02:00
Rachael Alexanderson
9b8ec98f78 - fix building in 32 bit windows 2019-05-14 17:16:15 +02:00
Christoph Oelckers
9030289e1e - use the Unicode version of Windows's clipboard functions. 2019-05-14 17:10:00 +02:00
Christoph Oelckers
4c9e6853b1 - made Windows backend parts of the console Unicode capable.
# Conflicts:
#	src/c_console.cpp
#	src/v_font.cpp
#	src/win32/i_system.cpp
2019-05-14 17:05:40 +02:00
drfrag
77498e2740 Revert "- Applied some Blzut3 patches to compile with MinGW."
This reverts commit ad5959b827.

Compilation with vanilla MinGW is broken since the changes to the HQ resize modes anyway.
2019-05-14 16:32:39 +02:00
Christoph Oelckers
8d157f3ced - switched the Windows backend to use the Windows Unicode API.
With localization for non-Latin languages on the support list the multibyte API doesn't cut it anymore. It neither can handle system text output outside the local code page nor can an ANSI window receive text input outside its own code page.
Similar problems exist for file names. With the multibyte API it is impossible to handle any file containing characters outside the active local code page.

So as of now, everything that may pass along some Unicode text will use the Unicode API with some text conversion functions. The only places where calls to the multibyte API were left are those where known string literals are passed or where the information is not used for anything but comparing it to other return values from the same API.

# Conflicts:
#	src/rendering/hwrenderer/postprocessing/hw_postprocess.h
#	src/win32/base_sysfb.cpp
#	src/win32/i_main.cpp
#	src/win32/win32basevideo.cpp
#	src/win32/win32glvideo.cpp

# Conflicts:
#	src/version.h
#	src/win32/i_main.cpp
#	src/win32/i_system.cpp
#	src/win32/optwin32.h
#	src/win32/win32gliface.cpp
#	wadsrc/static/language.enu
2019-05-14 16:17:05 +02:00
drfrag
411169bc46 - fixed: GetDisplayDeviceName must always pick a valid monitor.
There is no default here, so if vid_adapter is invalid for whatever reason the engine would crash without a defined setting.
(patch by Graf)
2019-05-02 17:28:25 +02:00
Christoph Oelckers
3158826ec0 - removed the automatic system language detection for Windows.
Default language is now always American English, just like on Linux and macOS.

# Conflicts:
#	src/g_cvars.cpp
#	src/gamedata/stringtable.cpp
#	src/textures/texturemanager.cpp

# Conflicts:
#	src/win32/i_system.cpp
2019-04-29 17:42:54 +02:00
alexey.lysiuk
0d968d0943 - replaced all usages of insecure vsprintf() function 2019-04-28 22:58:48 +02:00
Christoph Oelckers
e245852bff - removed FCriticalSection and replaced all of its uses with std::mutex.
There's really no need for a non-standard solution here anymore with C++11.
This also fixes an unreleased lock in the WildMidi code.

# Conflicts:
#	src/posix/sdl/critsec.cpp
2019-04-28 22:13:36 +02:00
Rachael Alexanderson
197c618dac - Remove "gitversion.h" from "version.h" - should result in faster compiles after a commit in Windows
- Fix zdoom.rc to show the actual git commit tag and id for the Product Version
- Made zdoom.rc "codepage 1252" compliant as dictated by the #pragma (if this needs changed the pragma should be updated, this was messing up the version strings in the final compile)

# Conflicts:
#	src/version.h

# Conflicts:
#	src/win32/zdoom.rc
2019-04-28 15:14:34 +02:00
Christoph Oelckers
77c00d7670 - replaced several explicit allocations with TArrays.
# Conflicts:
#	src/r_data/models/models_voxel.cpp
#	src/textures/formats/jpegtexture.cpp
#	src/textures/formats/pcxtexture.cpp
#	src/textures/formats/tgatexture.cpp

# Conflicts:
#	src/r_data/voxels.cpp
#	src/r_data/voxels.h
2019-04-18 13:58:37 +02:00
alexey.lysiuk
ec432beea0 - print VM stack trace on startup abort exception
https://forum.zdoom.org/viewtopic.php?t=62650
2019-04-17 19:57:22 +02:00
Christoph Oelckers
8669dbdcfe - removed test and debug code.
# Conflicts:
#	src/gl/scene/gl_scenedrawer.h
2019-04-15 21:50:57 +02:00
Christoph Oelckers
831cfd5280 - made CDoomError inherit from std::exception so that the main catch block can also deal with exceptions thrown by the STL.
- Also do not ignore empty exception messages as irrelevant. The only irrelevant exception type is CNoRunExit.
2018-11-23 19:41:05 +01:00
drfrag666
557380a769 - Added alpha parameter to DrawLine for the GL renderer, it's a fake parameter for the software renderer so mods don't crash. 2018-11-02 13:04:37 +01:00
Christoph Oelckers
b03c329ec6 - moved all GLDEFS parsing into a dedicated source file.
- split gl_postprocessshader.h in two so that the hardware independent part can be used by GLDEFS without pulling in all of OpenGL.

# Conflicts:
#	src/CMakeLists.txt
#	src/gl/dynlights/gl_glow.cpp
#	src/gl/renderer/gl_postprocess.cpp
#	src/gl/textures/gl_texture.cpp
2018-08-19 20:56:49 +02:00
drfrag666
4ed793eb3b - Disabled truecolor rendering and dynamic lights for software by default. 2018-07-27 02:04:18 +02:00
drfrag666
d5a15c66ad - Some cosmetic changes to the startup console. 2018-07-20 12:33:49 +02:00
drfrag666
76f60e51fe - New generic ZDoom icons by Tormentor667. 2018-06-20 19:57:56 +02:00
drfrag666
11ebbc689d - Changed game name to LZDoom. 2018-06-20 14:26:09 +02:00
drfrag666
cafb92c637 - Fall back to software mode if the GL renderer cannot start. 2018-06-19 17:08:59 +02:00
drfrag666
09a3d7c9da - Made the software renderer the default.
- Changed default GL texture filtering mode.
2018-06-19 17:08:10 +02:00
drfrag666
2fadfe53b4 - Fixed zdoom.rc for VS, _MSC_VER was not defined for the RC. 2018-06-18 18:40:25 +02:00
Magnus Norddahl
9bcd8aeb13 - remove unused VectoredTryCatch
# Conflicts:
#	src/win32/i_crash.cpp
2018-06-16 19:52:12 +02:00
drfrag666
d6369978b9 - Merged "- fixed Windows XP compatibility for MSVC 2017 targets".
Workaround initially implemented for MSVC 2015 is enabled with all Windows XP compatible toolsets regardless of Visual Studio version
(patch by _mental_)
Still it's a VS bug.
2018-05-31 11:00:19 +02:00
drfrag666
c656185069 - Extended workaround for the stat not working issue in v140_xp to v141_xp. 2018-05-29 09:51:12 +02:00
Christoph Oelckers
12a2dede7e - added CVAR to disable WGL_EXT_swap_control_tear.
At least on faster NVidia hardware, setting this to false and gl_finishbeforeswap to true gives a better experience because it reduces screen tearing - but the same setting will reduce frame rate quite dramatically on Intel and can cause bad stalls on some older GPUs when rendering camera textures.

(cherry picked from commit cc65490062)
2018-05-23 10:13:35 +02:00
Rachael Alexanderson
3d86244b61 - define zdoom.rc as a proper Windows text file, stop Git from mismanaging it
# Conflicts:
#	src/win32/zdoom.rc
2018-05-18 14:01:48 +02:00
drfrag666
0e25e40deb - Addressed crash on exit with MinGW. This is a hack and i've reported it as a bug in the MinGW C runtime. 2018-05-17 12:06:44 +02:00
alexey.lysiuk
a66686225d - fixed potential crash on startup, Windows only
At least one version of Windows SDK (10.0.17134.0) has broken _pgmptr/_get_pgmptr()
It points to an empty string for multi-byte character set applications
GetModuleFileName() is now used instead regardless of compiler/toolchain
Added extra guard against unexpected program paths to avoid crashes

https://forum.zdoom.org/viewtopic.php?t=60598
(cherry picked from commit e1e441091d)
2018-05-16 11:58:38 +02:00
drfrag
30a606ed6b - Fixed crash with textures larger than those supported by the hardware in the D3D backend.
# Conflicts:
#	src/win32/fb_d3d9.cpp
2018-05-12 14:28:58 +02:00
alexey.lysiuk
a545e7de35 - added end line to various messages
so they don't screw up further output anymore

(cherry picked from commit f17f8c9359)

# Conflicts:
#	src/gl/compatibility/gl_swshader20.cpp
2018-05-12 11:49:10 +02:00
drfrag666
d60299c740 - Fixed compilation with VS. 2018-05-11 14:22:43 +02:00
alexey.lysiuk
21ce592771 - skip rendering when application is not active
Use vid_activeinbackground CVAR to override this behavior

(cherry picked from commit 2be84dc636)

# Conflicts:
#	src/gl/system/gl_framebuffer.cpp
#	src/posix/cocoa/i_video.mm
#	src/posix/sdl/gl_sysfb.h
#	src/posix/sdl/sdlglvideo.cpp
#	src/win32/gl_sysfb.h
#	src/win32/win32gliface.cpp
2018-05-10 21:16:38 +02:00
Christoph Oelckers
84b261d947 - don't force the renderer to remain active in windowed mode when in the background.
It's ok to have this as an option, but not as an unconditional forced feature.

(cherry picked from commit b35213741f)
2018-05-10 14:59:22 +02:00
drfrag666
0c38c72ad7 - Some cleanup. 2018-04-27 22:00:31 +02:00