Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilNarayana committed Feb 13, 2024
1 parent b1b804e commit cf6fd90
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
5 changes: 4 additions & 1 deletion Source/Core/Core/CoreTiming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,10 @@ void CoreTimingManager::Advance()
m_event_queue.pop_back();

Throttle(evt.time);
evt.type->callback(m_system, evt.userdata, m_globals.global_timer - evt.time);
if (evt.type != nullptr) // slippi change
{
evt.type->callback(m_system, evt.userdata, m_globals.global_timer - evt.time);
}
}

m_is_global_timer_sane = false;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinQt/Config/Graphics/HacksWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ void HacksWidget::CreateWidgets()
m_store_xfb_copies =
new ConfigBool(tr("Store XFB Copies to Texture Only"), Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM);
// slippi: don't let people touch this!
m_immediate_xfb->setEnabled(false);
m_immediate_xfb = new ConfigBool(tr("Immediately Present XFB"), Config::GFX_HACK_IMMEDIATE_XFB);
m_immediate_xfb->setEnabled(false);
m_skip_duplicate_xfbs =
new ConfigBool(tr("Skip Presenting Duplicate Frames"), Config::GFX_HACK_SKIP_DUPLICATE_XFBS);

Expand Down
27 changes: 15 additions & 12 deletions Source/Core/DolphinQt/HotkeyScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,24 +477,27 @@ void HotkeyScheduler::Run()
"Speed Limit: Unlimited" :
fmt::format("Speed Limit: {}%", std::lround(emulation_speed * 100.f)));
};

if (!IsOnline())
{
auto speed = Config::Get(Config::MAIN_EMULATION_SPEED) - 0.1;
if (speed > 0)
if (IsHotkey(HK_INCREASE_EMULATION_SPEED))
{
auto speed = Config::Get(Config::MAIN_EMULATION_SPEED) + 0.1;
speed = (speed >= 0.95 && speed <= 1.05) ? 1.0 : speed;
Config::SetCurrent(Config::MAIN_EMULATION_SPEED, speed);
ShowEmulationSpeed();
}
if (IsHotkey(HK_DECREASE_EMULATION_SPEED))
{
{
auto speed = Config::Get(Config::MAIN_EMULATION_SPEED) - 0.1;
if (speed > 0)
{
speed = (speed >= 0.95 && speed <= 1.05) ? 1.0 : speed;
Config::SetCurrent(Config::MAIN_EMULATION_SPEED, speed);
}
ShowEmulationSpeed();
}
}
ShowEmulationSpeed();
}

if (IsHotkey(HK_INCREASE_EMULATION_SPEED))
{
auto speed = Config::Get(Config::MAIN_EMULATION_SPEED) + 0.1;
speed = (speed >= 0.95 && speed <= 1.05) ? 1.0 : speed;
Config::SetCurrent(Config::MAIN_EMULATION_SPEED, speed);
ShowEmulationSpeed();
}

// USB Device Emulation
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ Core::DeviceRemoval PipeDevice::UpdateInput()
// Read any pending characters off the pipe. If we hit a newline,
// then dequeue a command off the front of m_buf and parse it.
char buf[32];
std::size_t bytes_read = readFromPipe(m_fd, buf, sizeof buf); // slippi: confirm this still works for libmelee
std::size_t bytes_read =
readFromPipe(m_fd, buf, sizeof buf); // slippi: confirm this still works for libmelee
while (bytes_read > 0)
{
m_buf.append(buf, bytes_read);
Expand Down

0 comments on commit cf6fd90

Please sign in to comment.