mirror of
https://github.com/grumpycoders/pcsx-redux.git
synced 2026-10-12 02:15:13 +00:00
Merge pull request #1551 from johnbaumann/lua_cart_needs
Lua cart needs
This commit is contained in:
+1
-1
@@ -176,7 +176,7 @@ void PCSX::LuaFFI::open_extra(Lua L) {
|
||||
"open",
|
||||
[](lua_State* L_) -> int {
|
||||
Lua L(L_);
|
||||
auto ar = L.getinfo("S", 1);
|
||||
auto ar = L.getinfo("S", 2);
|
||||
auto name = L.tostring();
|
||||
IO<File> file = load(name, ar.has_value() ? ar->source : "");
|
||||
L.push(new LuaFile(file));
|
||||
|
||||
+5
-5
@@ -56,8 +56,8 @@ class SystemImpl final : public PCSX::System {
|
||||
if (m_args.isGUILogsEnabled()) s_ui->addNotification(s.c_str());
|
||||
if (s_ui->addLog(PCSX::LogClass::UI, s)) {
|
||||
if (m_args.isStdoutEnabled()) ::fputs(s.c_str(), stdout);
|
||||
m_eventBus->signal(PCSX::Events::LogMessage{PCSX::LogClass::UI, s});
|
||||
if (m_logfile) m_logfile->write(std::move(s));
|
||||
m_eventBus->signal(PCSX::Events::LogMessage{PCSX::LogClass::UI, s});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ class SystemImpl final : public PCSX::System {
|
||||
if (!s_ui->addLog(logClass, s)) return;
|
||||
}
|
||||
if (m_args.isStdoutEnabled()) ::fputs(s.c_str(), stdout);
|
||||
m_eventBus->signal(PCSX::Events::LogMessage{logClass, s});
|
||||
if (m_logfile) m_logfile->write(std::move(s));
|
||||
m_eventBus->signal(PCSX::Events::LogMessage{logClass, s});
|
||||
}
|
||||
|
||||
virtual void printf(std::string &&s) final override {
|
||||
@@ -75,8 +75,8 @@ class SystemImpl final : public PCSX::System {
|
||||
if (!s_ui->addLog(PCSX::LogClass::UNCATEGORIZED, s)) return;
|
||||
}
|
||||
if (m_args.isStdoutEnabled()) ::fputs(s.c_str(), stdout);
|
||||
m_eventBus->signal(PCSX::Events::LogMessage{PCSX::LogClass::UNCATEGORIZED, s});
|
||||
if (m_logfile) m_logfile->write(std::move(s));
|
||||
m_eventBus->signal(PCSX::Events::LogMessage{PCSX::LogClass::UNCATEGORIZED, s});
|
||||
}
|
||||
|
||||
virtual void luaMessage(const std::string &s, bool error) final override {
|
||||
@@ -100,14 +100,14 @@ class SystemImpl final : public PCSX::System {
|
||||
|
||||
virtual void softReset() final override {
|
||||
// debugger or UI is requesting a reset
|
||||
m_eventBus->signal(PCSX::Events::ExecutionFlow::Reset{});
|
||||
PCSX::g_emulator->m_cpu->psxReset();
|
||||
m_eventBus->signal(PCSX::Events::ExecutionFlow::Reset{});
|
||||
}
|
||||
|
||||
virtual void hardReset() final override {
|
||||
// debugger or UI is requesting a reset
|
||||
m_eventBus->signal(PCSX::Events::ExecutionFlow::Reset{true});
|
||||
PCSX::g_emulator->reset();
|
||||
m_eventBus->signal(PCSX::Events::ExecutionFlow::Reset{true});
|
||||
}
|
||||
|
||||
virtual void close() final override {
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<ClInclude Include="..\..\third_party\luafilesystem\src\lfs.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\src\lua\extra.lua" />
|
||||
<None Include="..\..\src\lua\fileffi-cdef.lua" />
|
||||
<None Include="..\..\src\lua\fileffi.lua" />
|
||||
<None Include="..\..\src\lua\fileffimeta.lua" />
|
||||
|
||||
@@ -119,5 +119,8 @@
|
||||
<None Include="..\..\src\lua\fileffimeta.lua">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\lua\extra.lua">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user