mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-25 14:15:02 +00:00
refactor: Enhance service architecture by introducing IPlatformService and updating dependencies
- Removed core/platform.hpp and core/vulkan_utils.cpp, integrating their functionality into new platform_service implementations. - Updated service registrations to utilize IPlatformService for improved modularity. - Refactored event bus usage across services to leverage IEventBus interface. - Enhanced buffer management in BufferService with detailed logging and error handling. - Updated GUI rendering services to utilize buffer service for resource management. - Cleaned up includes and improved overall code organization for better maintainability.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include "app/service_based_app.hpp"
|
||||
#include <SDL3/SDL_main.h>
|
||||
#include "services/interfaces/i_logger.hpp"
|
||||
#include "core/platform.hpp"
|
||||
#include "services/impl/platform_service.hpp"
|
||||
|
||||
using namespace sdl3cpp::services;
|
||||
|
||||
@@ -168,7 +168,8 @@ RuntimeConfig LoadRuntimeConfigFromJson(const std::filesystem::path& configPath,
|
||||
}
|
||||
|
||||
std::optional<std::filesystem::path> GetDefaultConfigPath() {
|
||||
if (auto dir = sdl3cpp::platform::GetUserConfigDirectory()) {
|
||||
sdl3cpp::services::impl::PlatformService platformService;
|
||||
if (auto dir = platformService.GetUserConfigDirectory()) {
|
||||
return *dir / "default_runtime.json";
|
||||
}
|
||||
return std::nullopt;
|
||||
|
||||
Reference in New Issue
Block a user