Skip to content

Commit

Permalink
Fix mount_cache and some defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
SirMangler committed Feb 11, 2023
1 parent d744ea8 commit 2187398
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
20 changes: 11 additions & 9 deletions src/xenia/app/xenia_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ DEFINE_path(
"Storage");

DEFINE_bool(mount_scratch, false, "Enable scratch mount", "Storage");
DEFINE_bool(mount_cache, true, "Enable cache mount", "Storage");
DEFINE_bool(mount_cache, false, "Enable cache mount", "Storage");

DEFINE_transient_path(target,
DEFINE_transient_path(target,
"",
"Specifies the target .xex or .iso to execute.",
"General");
Expand Down Expand Up @@ -515,9 +515,11 @@ void EmulatorApp::EmulatorThread() {
app_context().CallInUIThread(
[this]() { emulator_window_->SetupGraphicsSystemPresenterPainting(); });

std::string userFolder = filesystem::GetExecutableFolder().string() + "\\";

if (cvars::mount_scratch) {
auto scratch_device = std::make_unique<xe::vfs::HostPathDevice>(
"\\SCRATCH", "scratch", false);
"\\SCRATCH", userFolder + "scratch", false);
if (!scratch_device->Initialize()) {
XELOGE("Unable to scan scratch path");
} else {
Expand All @@ -531,8 +533,8 @@ void EmulatorApp::EmulatorThread() {
}

if (cvars::mount_cache) {
auto cache0_device =
std::make_unique<xe::vfs::HostPathDevice>("\\CACHE0", "cache0", false);
auto cache0_device = std::make_unique<xe::vfs::HostPathDevice>(
"\\CACHE0", userFolder + "cache0", false);
if (!cache0_device->Initialize()) {
XELOGE("Unable to scan cache0 path");
} else {
Expand All @@ -543,8 +545,8 @@ void EmulatorApp::EmulatorThread() {
}
}

auto cache1_device =
std::make_unique<xe::vfs::HostPathDevice>("\\CACHE1", "cache1", false);
auto cache1_device = std::make_unique<xe::vfs::HostPathDevice>(
"\\CACHE1", userFolder + "cache1", false);
if (!cache1_device->Initialize()) {
XELOGE("Unable to scan cache1 path");
} else {
Expand All @@ -559,8 +561,8 @@ void EmulatorApp::EmulatorThread() {
// NOTE: this must be registered _after_ the cache0/cache1 devices, due to
// substring/start_with logic inside VirtualFileSystem::ResolvePath, else
// accesses to those devices will go here instead
auto cache_device =
std::make_unique<xe::vfs::HostPathDevice>("\\CACHE", "cache", false);
auto cache_device = std::make_unique<xe::vfs::HostPathDevice>(
"\\CACHE", userFolder + "cache", false);
if (!cache_device->Initialize()) {
XELOGE("Unable to scan cache path");
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/xenia/apu/audio_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// implementations. They can be found in xboxkrnl_audio_xma.cc

DEFINE_uint32(
max_queued_frames, 3,
max_queued_frames, 16,
"Allows changing max buffered audio frames to reduce audio delay.", "APU");

namespace xe {
Expand Down
2 changes: 1 addition & 1 deletion src/xenia/gpu/d3d12/pipeline_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "xenia/gpu/xenos.h"
#include "xenia/ui/d3d12/d3d12_util.h"

DEFINE_bool(d3d12_dxbc_disasm, true,
DEFINE_bool(d3d12_dxbc_disasm, false,
"Disassemble DXBC shaders after generation.", "D3D12");
DEFINE_bool(
d3d12_dxbc_disasm_dxilconv, false,
Expand Down
3 changes: 2 additions & 1 deletion xenia-canary-uwp/XeniaUWP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using namespace xe;
using namespace xe::hid;

DECLARE_string(gamepaths);
DEFINE_string(gamepaths, "", "Paths the frontend will search for games.",
"General");

Expand All @@ -37,10 +38,10 @@ void UWP::StartXenia() {
app_context = std::make_unique<ui::UWPWindowedAppContext>();
app = xe::ui::GetWindowedAppCreator()(*app_context.get());

InitialisePaths();
xe::InitializeWin32App(app->GetName());

if (app->OnInitialize()) {
InitialisePaths();
// to-do, remodel this so it doesn't instantly shutdown.
//app->InvokeOnDestroy();
}
Expand Down
1 change: 1 addition & 0 deletions xenia-canary-uwp/xenia-canary-uwp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<ClCompile>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\src;$(SolutionDir)..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|x64'">stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
Expand Down

0 comments on commit 2187398

Please sign in to comment.