Commit Graph

17 Commits

Author SHA1 Message Date
Jesse Talavera-Greenberg
346dd4006e
Move all core types into namespaces (#1886)
* Reorganize namespaces

- Most types are now moved into the `melonDS` namespace
- Only good chance to do this for a while, since a big refactor is next

* Fix the build
2023-11-25 18:32:09 +01:00
Arisotura
ac38faef14 update copyright years 2023-11-04 00:21:46 +01:00
Jesse Talavera-Greenberg
21590b0709
Miscellaneous DSi NAND fixes (#1852)
* Replace some standard I/O calls with Platform equivalents

- I missed a spot when I submitted that PR a few months ago

* Include <memory> in DSi_NAND.h

- Because it uses unique_ptr

* Split DSi_NAND::ReadHardwareInfo into ReadSerialData and ReadHardwareInfoN

* Add a RegionMask enum

* Move DSi NAND patching to the frontend

* Add DSiSupportedLanguageMask

- Not currently used by the frontend, but I use it in melonDS DS

* Remove some Platform::ConfigEntry values

- The core no longer needs to know about them
- The corresponding Config values are unchanged

* Mark NANDMount's destructor as noexcept
2023-10-24 23:28:14 +02:00
Jesse Talavera-Greenberg
db963aa002
Make the NDS teardown more robust (#1798)
* Make cleanup a little more robust to mitigate undefined behavior

- Add some null checks before cleaning up the GPU3D renderer
- Make sure that all deleted objects are null
- Move cleanup logic out of an assert call
- Note that deleting a null pointer is a no-op, so there's no need to check for null beforehand
- Use RAII for GLCompositor instead of Init/DeInit methods

* Replace a DeInit call that I missed

* Make ARMJIT_Memory less likely to generate errors

- Set FastMem7/9Start to nullptr at the end
- Only close and unmap the file if it's initialized

* Make Renderer3D manage its resources with RAII

* Don't try to deallocate frontend resources that aren't loaded

* Make ARMJIT_Memory::DeInit more robust on the Switch

* Reset MemoryFile on Windows to INVALID_HANDLE_VALUE, not nullptr

- There is a difference

* Don't explicitly store a Valid state in GLCompositor or the 3D renderers

- Instead, create them with static methods while making the actual constructors private

* Make initialization of OpenGL resources fail if OpenGL isn't loaded

* assert that OpenGL is loaded instead of returning failure
2023-09-15 15:31:05 +02:00
Jesse Talavera-Greenberg
79dfb8dc8f
Introduce Platform::Log (#1640)
* Add Platform::Log and Platform::LogLevel

* Replace most printf calls with Platform::Log calls

* Move a brace down

* Move some log entries to one Log call

- Some implementations of Log may assume a full line

* Log the MAC address as LogLevel::Info
2023-03-23 18:04:38 +01:00
Arisotura
35cc79787d update copyright headers 2022-01-09 02:15:50 +01:00
RSDuck
436b3c4c1d update copyright year and add missing GPL headers 2021-03-12 20:07:40 +01:00
RSDuck
f1e0816c1a detach and delete shaders directly after linking 2021-02-11 18:38:52 +01:00
WaluigiWare64
ab222ab135
Use libepoxy to load in OpenGL functions (#960)
* Use libepoxy to load in OpenGL functions

Prevents having to load them in manually

* Install libepoxy in the CI

* Do not link OpenGL libraries, libepoxy opens them itself

* Add libepoxy to build instructions
2021-01-26 13:19:32 +00:00
Arisotura
36f4cdbbbf get the OpenGL renderer going.
sorta.

(also make the blackmagic_II branch obsolete in the process)
2020-05-25 18:25:50 +02:00
Arisotura
83f8e11bc1 update copyright years 2020-02-14 20:18:08 +01:00
Arisotura
06e08b053f do binding of VS inputs and FS outputs before linking shader programs, as per OpenGL standard.
should fix the rendering issues with strict drivers (AMD, Intel).
2019-05-31 02:26:13 +02:00
StapleButter
891ab9fd3c Linux: start getting somewhere with the whole OpenGL shito 2019-05-28 19:48:59 +02:00
PoroCYon
31e0f15797 fix oudated CMake compile settings, add OpenGL dependency for Linux 2019-05-26 00:37:51 +02:00
Arisotura
7cdeb7fa4e feeble, miserable little attempt at emulating fog 2019-05-25 04:28:00 +02:00
Arisotura
f2725791d8 preliminary, shitty, code for drawing the main window with OpenGL 2019-05-16 00:30:55 +02:00
Arisotura
256b8cb69c botch GL support. 2019-05-15 19:49:21 +02:00