Commit Graph

227 Commits

Author SHA1 Message Date
Mark Jansen a689d8e450 Fix building love on Windows for SDL3-3.1.0 2024-04-01 19:26:52 +02:00
Sasha Szpakowski 6dc2fdba35 SDL3: use synchronous window operations (for now). 2024-03-25 23:14:58 -03:00
Sasha Szpakowski 8d360113f8 update code for some recent SDL3 renames 2024-03-25 20:55:28 -03:00
Sasha Szpakowski 2bdadf51d4 Merge branch 'main' into SDL3 2024-03-24 18:53:08 -03:00
Sasha Szpakowski 1e97e09b28 Rework internal module registration to happen in constructors. 2024-02-24 15:21:38 -04:00
Sasha Szpakowski 007090af14 ImageData: remove automatic mutex locks. 2024-02-18 17:06:40 -04:00
Sasha Szpakowski 64a30f177f Merge branch 'main' into 12.0-development 2024-02-10 12:24:48 -04:00
Sasha Szpakowski 94d5864144 update year for copyright notice 2024-02-10 12:13:22 -04:00
Sasha Szpakowski 62ac858f30 Initial source code support for SDL3. No build system support. 2024-02-04 17:02:26 -04:00
Sasha Szpakowski 6feedc8222 Add love.window.getPointer, returns a SDL_Window* as lightuserdata. 2024-01-08 21:09:40 -04:00
Sasha Szpakowski aaab9791d5 Improve backbuffer depth buffer.
- Setting the depth buffer for the backbuffer is now done as a boolean instead of a bit depth integer, in love.conf or love.window.setMode.
- Error if depth writes are enabled when the active canvas setup or backbuffer does not have a depth buffer (now it matches stencil behaviour).
- Don't allocate a backbuffer depth-stencil buffer if they're not requested. Metal also determines the format for that buffer based on which combination of depth and stencil is requested. OpenGL still has to allocate the depth-stencil buffer for the backbuffer all the time, because changing it requires the context to be recreated.
2024-01-06 15:21:06 -04:00
Sasha Szpakowski 6e80d85110 Merge branch 'main' into 12.0-development 2023-08-19 21:35:55 -03:00
Sasha Szpakowski e582677344 Fix mouse position backward compatibility with new SDL2 versions.
Clamp the mouse coordinates to the window's dimensions.
2023-07-01 17:53:29 -03:00
Sasha Szpakowski 7828d1e0fb Fix macOS colorspace backport 2023-04-23 21:19:32 -03:00
slime f6e9277a6d macOS: fix colors appearing oversaturated on P3 displays.
The fix only applies to macOS 11+ when using OpenGL.
2023-04-13 22:03:23 -03:00
Sasha Szpakowski 2c3ea60c79 Add love.window.focus (resolves #1911).
Calling the function brings the window into the foreground and makes it the focused window for keyboard input.
2023-04-01 18:02:16 -03:00
Sasha Szpakowski 95d44c2c2d very minor compile speed improvements 2023-02-11 16:29:24 -04:00
Sasha Szpakowski f6cdbdc868 Merge branch 'main' into 12.0-development 2022-12-31 22:46:34 -04:00
Sasha Szpakowski c823dbca96 Update copyright year for 2023 2022-12-31 22:25:49 -04:00
niki 28c69597e4 vulkan: fix crash 2022-12-22 02:27:35 +01:00
niki ccca355664 vulkan: fix love.window.setVsync 2022-12-22 01:27:05 +01:00
Sasha Szpakowski 90c3e8d6c8 remove pre-SDL 2.0.4 hacks from window code. 2022-12-07 23:30:20 -04:00
Sasha Szpakowski c89192990b vulkan: potentially improved highdpi support.
Mostly untested.
2022-12-06 20:36:36 -04:00
Miku AuahDark 93612a84d1 Bump minimum SDL version to 2.0.9 2022-12-06 14:19:53 +08:00
Sasha Szpakowski d70514b2d1 vulkan: when vsync is off prefer immediate instead of mailbox mode, for now.
Fixes #1852. This might be reevaluated in the future.
2022-12-04 17:51:11 -04:00
Sasha Szpakowski 4136da52e9 vulkan: fix love.window.getVSync 2022-12-04 17:48:17 -04:00
Miku AuahDark 9deaa06a73 Windows: Slight changes to ARM64 support.
* Disable NSIS installer if we're compiling for Windows ARM64.
* Allow arbitrary files to be added as LOVE_EXTRA_DLLS
2022-10-17 00:28:07 +08:00
slime 6173c1638d macOS: fix colors appearing oversaturated on P3 displays.
The fix only applies to macOS 11+ when using OpenGL.
2022-09-30 15:17:46 -03:00
niki faeca1c4bc vulkan: fix wrong image layout validation warnings 2022-09-12 13:46:03 +02:00
niki 7be9bb3ecc vulkan: implement vsync setting 2022-08-19 21:40:21 +02:00
niki f4ece69307 Merge remote-tracking branch 'origin/12.0-development' into vulkan 2022-08-15 03:43:35 +02:00
niki 9b7cfef5ef vulkan: implement setScissor 2022-07-16 23:19:24 +02:00
niki 565455c3ea proper selection of vulkan renderer 2022-07-10 03:46:12 +02:00
Alex Szpakowski d586d18474 Properly use SDL's new Windows dpi scaling hint.
Fixes #1814.
Fixes #1421.
2022-07-03 17:03:58 -03:00
Alex Szpakowski 814aaa95cd Fix compilation on Windows 2022-06-18 18:09:58 -03:00
Alex Szpakowski 2149457c72 Merge branch 'main' into 12.0-development 2022-06-18 17:52:27 -03:00
niki 12b9978173 Merge remote-tracking branch 'origin/12.0-development' into vulkan 2022-06-12 02:06:44 +02:00
Alex Szpakowski 17b359f939 Windows: add support for high-dpi when capable SDL versions are used.
Issue #1421
2022-06-11 19:49:26 -03:00
niki d0aaddfef6 cleanup redundant initialization code 2022-05-08 22:51:11 +02:00
niki 75a6bc9b5d Merge remote-tracking branch 'origin/12.0-development' into vulkan 2022-05-06 16:46:55 +02:00
Alex Szpakowski 5175b0d1b5 Windows: fix some cases of stuttering in windowed mode.
Use DwmFlush instead of OpenGL vsync, when specific conditions are met. Fixes #1628.
2022-04-17 11:26:06 -03:00
Alex Szpakowski 34f036f2e1 Rename 'display' field to 'displayindex' in setMode and love.conf.
Fixes #1711.
2022-04-15 23:16:13 -03:00
Alex Szpakowski 6e35ffe2d8 metal: fix window pixel size when resizing 2022-02-19 14:17:37 -04:00
Alex Szpakowski d4c1025070 Merge branch 'main' into 12.0-development 2022-02-05 21:40:24 -04:00
niki b80ef89e8d handle resizing correctly 2022-02-04 23:48:32 +01:00
niki 65074dae15 hello world triangle 2022-02-04 23:45:58 +01:00
Alex Szpakowski 878ad785bc Remove obsolete macOS window min size workaround.
Fixes #1444.

The reason for the SetWindowMinSize call after exiting fullscreen doesn't seem to be needed anymore, and it was breaking setFullscreen(false) in Linux.
2022-01-16 18:41:14 -04:00
Alex Szpakowski 425537ad5e Metal view creation failure shows a relevant error message. 2022-01-06 17:37:56 -04:00
Alex Szpakowski d51e012812 Merge branch '12.0-development' into metal 2022-01-05 21:12:22 -04:00
Alex Szpakowski 7f3538d2ba Merge branch 'main' into 12.0-development 2022-01-05 21:10:27 -04:00