Commit Graph

15 Commits

Author SHA1 Message Date
Simon Anciaux 33c3428796 Clipboard fix
Fixed duplicated entries in 4coder internal clipboard (Fix from VDK on the 4coder discord).
Removed the unnecessary loop that was there to try to fix the clipboard missing entries (which was fixed previously by removing the `next_clipboard_is_self` variable).
2025-07-07 13:07:35 -07:00
Simon Anciaux dfce9bf369 Fix wrong initialization of keycode lookup table
Up until now, several keys were assigned the same key value because the `keycode_lookup_table` array wasn't properly initialized. The values at the end of the array were all set to `KeyCode_Ex0 + 1` which is 112. This would cause several key to be treated as the same key.

In my case the key next to the left shift key ( `<` and `>` on AZERTY) was getting the same value as the `Right Windows key`. But I suppose that the left and right windows key would get the same value too (I can't check this as I have only 1 windows key on my keyboard).

This fix just properly initialize the array. I also fixed a typo in a function name: `keycode_physical_translaion_is_wrong` => `keycode_physical_translation_is_wrong`.
2025-07-07 13:06:29 -07:00
Simon Anciaux f3dc516704 Disable DXGI monitoring the message queue for Alt+Enter fullscreen switch. Switching that way instead of calling toggle_fullscreen, causes issue when trying to Alt+Tab. Also users might want to use Alt+Enter for other things.
Changed how DXGI factory is handled. I retrieve the one associated with the current DXGI device and adapter instead of creating a new one.
Fixed missing new line in the log at 1 location.
2025-07-07 13:05:28 -07:00
Simon Anciaux dadb7dc49a Fixed crashing when 4coder tries to render more vertex than the vertex buffer reserved. We create a new buffer to accommodate the required size, and if that fails, we skip rendering the current vertex group. 2025-07-07 13:04:14 -07:00
Simon Anciaux 84da2da350 Changed `true` to `GL_TRUE` for `WGL_DOUBLE_BUFFER_ARB` to use OpenGL wording. 2025-07-07 13:03:52 -07:00
Simon Anciaux cbbd83affc Commented the DirectX 11 define to default to OpenGL. 2025-07-07 13:03:44 -07:00
Simon Anciaux c81d9b4e97 Renamed files from direcx to dx11. 2025-07-07 13:03:34 -07:00
Simon Anciaux d0a18fcdb7 Renamed "directx" to dx11 in several variable names, types and defines.
Added date to NOTEs and TODOs.
Tried to make log strings more useful, even if I don't know how you display things log with log_os.
2025-07-07 13:03:26 -07:00
Simon Anciaux 7ce0a7d698 code/platform_win32/4ed_directx_render.cpp: Reuse freed textures. Rename variables so that texture handle are always named texid. 2025-07-07 13:03:19 -07:00
Simon Anciaux b651847ba3 4ed_directx_render.cpp: Initialize textures to zero to avoid having random pixel values that changes the result of linear sampling on the edge of characters. 2025-07-07 13:03:10 -07:00
Simon Anciaux e4b4e5c943 code/platform_win32/4ed_directx_render.cpp: Fixed the way texture array are updated. Note that the font provider rectangle packer contains a bug, and it will never produce several texture slice, it will only grow the texture on y to accommodate for more characters.
code/platform_win32/win32_opengl.cpp: Enabled double buffering to fix graphical glitches on AMD cards.
2025-07-07 13:02:52 -07:00
Simon Anciaux 911df4ce05 code/bin/4ed_build.cpp: Removed OpenGL.lib. It's added with #pragma comment in win32_opengl.cpp so that we don't need to do special things to keep OpenGL and DirectX both working.
code/platform_win32/win32_4ed.cpp:
- Modification to be able to choose between OpenGL and DirectX. You choose between the two by defining WIN32_DIRECTX macro. If you don't define it it uses OpenGL.
- Note that win32_gl_create_window and other part of the file that depend on OpenGL or DirectX have been moved to win32_opengl.cpp and win32_directx.cpp.
- Fixed os_popup_error using the title as the message and the message as the title.

code/platform_win32/win32_opengl.cpp: Contains previous code that was in win32_4ed.cpp.

code/platform_win32/win32_directx.cpp: Code for creating a DirectX window and context.

code/platform_win32/4ed_directx_render.cpp: Imlementation of the 4coder renderer using DirectX.
2025-07-07 13:02:42 -07:00
PS 80b780278a Removed custom/audio 2024-02-10 14:25:13 -08:00
Jack Punter e3cbab907b Remove win32 clipboard flag which ocasionally results in mis-paste from the system clipboard 2023-11-01 21:24:36 +00:00
Jack Punter 0e47ccd2ce Add 'code/' from commit '1459ef7cbce753b056ea148b29c9dc3f8a721261'
git-subtree-dir: code
git-subtree-mainline: cf6a50363e
git-subtree-split: 1459ef7cbc
2022-11-18 13:37:07 +00:00