mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 07:38:56 +02:00
flatten
This commit is contained in:
parent
37b2a98b02
commit
3fd2ff0079
12 changed files with 12 additions and 43 deletions
|
|
@ -6,9 +6,9 @@
|
|||
// Created by Jarrod Norwell on 1/20/24.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AppUIGameInformation.h"
|
||||
#import "../DirectoryManager/DirectoryManager.h"
|
||||
#import "../EmulationSession/EmulationSession.h"
|
||||
#import "EmulationSession/EmulationSession.h"
|
||||
|
||||
#include "common/fs/fs.h"
|
||||
#include "common/fs/path_util.h"
|
||||
|
|
@ -382,7 +382,9 @@ GameMetadata CacheGameMetadata(const std::string& path) {
|
|||
|
||||
GameMetadata GameMetadata(const std::string& path, bool reload = false) {
|
||||
if (!EmulationSession::GetInstance().IsInitialized()) {
|
||||
Common::FS::SetAppDirectory(DirectoryManager::AppUIDirectory());
|
||||
NSURL *dir_url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] firstObject];
|
||||
const char *directory_cstr = [[dir_url path] UTF8String];
|
||||
Common::FS::SetAppDirectory(directory_cstr);
|
||||
|
||||
EmulationSession::GetInstance().System().Initialize();
|
||||
EmulationSession::GetInstance().InitializeSystem(false);
|
||||
|
|
@ -73,8 +73,10 @@
|
|||
if (self = [super init]) {
|
||||
_gameInformation = [AppUIGameInformation sharedInstance];
|
||||
|
||||
NSURL *dir_url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] firstObject];
|
||||
const char *directory_cstr = [[dir_url path] UTF8String];
|
||||
|
||||
Common::FS::SetAppDirectory(DirectoryManager::AppUIDirectory());
|
||||
Common::FS::SetAppDirectory(directory_cstr);
|
||||
Config{"config", Config::ConfigType::GlobalConfig};
|
||||
|
||||
EmulationSession::GetInstance().System().Initialize();
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
#import <QuartzCore/CAMetalLayer.h>
|
||||
|
||||
#import <Metal/Metal.hpp>
|
||||
#import "../EmulationWindow/EmulationWindow.h"
|
||||
#import "EmulationWindow/EmulationWindow.h"
|
||||
|
||||
#include "common/detached_tasks.h"
|
||||
#include "core/core.h"
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
//
|
||||
|
||||
#import "EmulationWindow.h"
|
||||
#import "../EmulationSession/EmulationSession.h"
|
||||
#import "EmulationSession/EmulationSession.h"
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
|
|
@ -58,9 +58,7 @@ void EmulationWindow::OnGamepadJoystickEvent(int player_index, int stick_id, flo
|
|||
m_input_subsystem->GetVirtualGamepad()->SetStickPosition(player_index, stick_id, x, y);
|
||||
}
|
||||
|
||||
void EmulationWindow::OnGamepadMotionEvent(int player_index, u64 delta_timestamp, float gyro_x,
|
||||
float gyro_y, float gyro_z, float accel_x,
|
||||
float accel_y, float accel_z) {
|
||||
void EmulationWindow::OnGamepadMotionEvent(int player_index, u64 delta_timestamp, float gyro_x, float gyro_y, float gyro_z, float accel_x, float accel_y, float accel_z) {
|
||||
m_input_subsystem->GetVirtualGamepad()->SetMotionState(player_index, delta_timestamp, gyro_x, gyro_y, gyro_z, accel_x, accel_y, accel_z);
|
||||
}
|
||||
|
||||
|
|
@ -70,9 +68,7 @@ void EmulationWindow::OnFrameDisplayed() {
|
|||
}
|
||||
}
|
||||
|
||||
EmulationWindow::EmulationWindow(InputCommon::InputSubsystem* input_subsystem, CA::MetalLayer* surface, CGSize size,
|
||||
std::shared_ptr<Common::DynamicLibrary> driver_library)
|
||||
: m_input_subsystem{input_subsystem}, m_size{size}, m_driver_library{driver_library} {
|
||||
EmulationWindow::EmulationWindow(InputCommon::InputSubsystem* input_subsystem, CA::MetalLayer* surface, CGSize size, std::shared_ptr<Common::DynamicLibrary> driver_library) : m_input_subsystem{input_subsystem}, m_size{size}, m_driver_library{driver_library} {
|
||||
LOG_INFO(Frontend, "initializing");
|
||||
|
||||
if (!surface) {
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
//
|
||||
// DirectoryManager.h - Sudachi
|
||||
// Created by Jarrod Norwell on 1/18/24.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace DirectoryManager {
|
||||
const char* AppUIDirectory(void);
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
//
|
||||
// DirectoryManager.mm - Sudachi
|
||||
// Created by Jarrod Norwell on 1/18/24.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "DirectoryManager.h"
|
||||
|
||||
NSURL *DocumentsDirectory() {
|
||||
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] firstObject];
|
||||
}
|
||||
|
||||
const char* DirectoryManager::AppUIDirectory(void) {
|
||||
return [[DocumentsDirectory() path] UTF8String];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue