mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-22 10:19:01 +00:00
fix stutter. need cleanup
This commit is contained in:
parent
e7b9a20805
commit
e842065405
5 changed files with 50 additions and 16 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,6 +6,7 @@ Thumbs.db
|
||||||
Source/Core/Common/scmrev.h
|
Source/Core/Common/scmrev.h
|
||||||
# Ignore files output by build
|
# Ignore files output by build
|
||||||
/[Bb]uild*/
|
/[Bb]uild*/
|
||||||
|
/out/
|
||||||
/[Bb]inary*/
|
/[Bb]inary*/
|
||||||
/obj/
|
/obj/
|
||||||
# Ignore files output by Android cmake build
|
# Ignore files output by Android cmake build
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "Release",
|
"name": "Release",
|
||||||
|
@ -11,7 +11,8 @@
|
||||||
"variables": [
|
"variables": [
|
||||||
{
|
{
|
||||||
"name": "Qt5_DIR",
|
"name": "Qt5_DIR",
|
||||||
"value": "${workspaceRoot}\\Externals\\Qt\\Qt5.14.1\\msvc2019_64\\lib\\cmake\\Qt5"
|
"value": "${workspaceRoot}\\Externals\\Qt\\Qt5.14.1\\msvc2019_64\\lib\\cmake\\Qt5",
|
||||||
|
"type": "STRING"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -26,7 +27,8 @@
|
||||||
"variables": [
|
"variables": [
|
||||||
{
|
{
|
||||||
"name": "Qt5_DIR",
|
"name": "Qt5_DIR",
|
||||||
"value": "${workspaceRoot}\\Externals\\Qt\\Qt5.14.1\\msvc2019_64\\lib\\cmake\\Qt5"
|
"value": "${workspaceRoot}\\Externals\\Qt\\Qt5.14.1\\msvc2019_64\\lib\\cmake\\Qt5",
|
||||||
|
"type": "STRING"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -41,15 +43,18 @@
|
||||||
"variables": [
|
"variables": [
|
||||||
{
|
{
|
||||||
"name": "Qt5_DIR",
|
"name": "Qt5_DIR",
|
||||||
"value": "${workspaceRoot}\\Externals\\Qt\\Qt5.14.1\\msvc2019_arm64\\lib\\cmake\\Qt5"
|
"value": "${workspaceRoot}\\Externals\\Qt\\Qt5.14.1\\msvc2019_arm64\\lib\\cmake\\Qt5",
|
||||||
|
"type": "STRING"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CMAKE_SYSTEM_NAME",
|
"name": "CMAKE_SYSTEM_NAME",
|
||||||
"value": "Windows"
|
"value": "Windows",
|
||||||
|
"type": "STRING"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CMAKE_SYSTEM_PROCESSOR",
|
"name": "CMAKE_SYSTEM_PROCESSOR",
|
||||||
"value": "aarch64"
|
"value": "aarch64",
|
||||||
|
"type": "STRING"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -64,17 +69,32 @@
|
||||||
"variables": [
|
"variables": [
|
||||||
{
|
{
|
||||||
"name": "Qt5_DIR",
|
"name": "Qt5_DIR",
|
||||||
"value": "${workspaceRoot}\\Externals\\Qt\\Qt5.14.1\\msvc2019_arm64\\lib\\cmake\\Qt5"
|
"value": "${workspaceRoot}\\Externals\\Qt\\Qt5.14.1\\msvc2019_arm64\\lib\\cmake\\Qt5",
|
||||||
|
"type": "STRING"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CMAKE_SYSTEM_NAME",
|
"name": "CMAKE_SYSTEM_NAME",
|
||||||
"value": "Windows"
|
"value": "Windows",
|
||||||
|
"type": "STRING"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CMAKE_SYSTEM_PROCESSOR",
|
"name": "CMAKE_SYSTEM_PROCESSOR",
|
||||||
"value": "aarch64"
|
"value": "aarch64",
|
||||||
|
"type": "STRING"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x64-Release",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"configurationType": "RelWithDebInfo",
|
||||||
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
|
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||||
|
"cmakeCommandArgs": "",
|
||||||
|
"buildCommandArgs": "",
|
||||||
|
"ctestCommandArgs": "",
|
||||||
|
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||||
|
"variables": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -118,6 +118,7 @@ void SlippiPlaybackStatus::processInitialState()
|
||||||
{
|
{
|
||||||
INFO_LOG(SLIPPI, "saving iState");
|
INFO_LOG(SLIPPI, "saving iState");
|
||||||
State::SaveToBuffer(iState);
|
State::SaveToBuffer(iState);
|
||||||
|
State::SaveToBuffer(cState);
|
||||||
SConfig::GetInstance().bHideCursor = false;
|
SConfig::GetInstance().bHideCursor = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -266,7 +267,12 @@ void SlippiPlaybackStatus::loadState(s32 closestStateFrame)
|
||||||
std::string stateString;
|
std::string stateString;
|
||||||
decoder.Decode((char*)iState.data(), iState.size(), futureDiffs[closestStateFrame].get(), &stateString);
|
decoder.Decode((char*)iState.data(), iState.size(), futureDiffs[closestStateFrame].get(), &stateString);
|
||||||
std::vector<u8> stateToLoad(stateString.begin(), stateString.end());
|
std::vector<u8> stateToLoad(stateString.begin(), stateString.end());
|
||||||
State::LoadFromBuffer(stateToLoad);
|
if (stateToLoad.size() == 0) {
|
||||||
|
std::cout << "wtf break" << std::endl;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
State::LoadFromBuffer(stateToLoad);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
#include "Common/Timer.h"
|
#include "Common/Timer.h"
|
||||||
#include "Common/Version.h"
|
#include "Common/Version.h"
|
||||||
|
|
||||||
|
#include "Common/Logging/Log.h"
|
||||||
|
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/CoreTiming.h"
|
#include "Core/CoreTiming.h"
|
||||||
|
@ -192,8 +194,8 @@ static void DoState(PointerWrap& p)
|
||||||
|
|
||||||
// Movie must be done before the video backend, because the window is redrawn in the video backend
|
// Movie must be done before the video backend, because the window is redrawn in the video backend
|
||||||
// state load, and the frame number must be up-to-date.
|
// state load, and the frame number must be up-to-date.
|
||||||
Movie::DoState(p);
|
// Movie::DoState(p);
|
||||||
p.DoMarker("Movie");
|
// p.DoMarker("Movie");
|
||||||
|
|
||||||
// Begin with video backend, so that it gets a chance to clear its caches and writeback modified
|
// Begin with video backend, so that it gets a chance to clear its caches and writeback modified
|
||||||
// things to RAM
|
// things to RAM
|
||||||
|
@ -214,9 +216,9 @@ static void DoState(PointerWrap& p)
|
||||||
Gecko::DoState(p);
|
Gecko::DoState(p);
|
||||||
p.DoMarker("Gecko");
|
p.DoMarker("Gecko");
|
||||||
|
|
||||||
#if defined(HAVE_FFMPEG)
|
//#if defined(HAVE_FFMPEG)
|
||||||
FrameDump::DoState();
|
// FrameDump::DoState();
|
||||||
#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadFromBuffer(std::vector<u8>& buffer)
|
void LoadFromBuffer(std::vector<u8>& buffer)
|
||||||
|
@ -240,16 +242,17 @@ void SaveToBuffer(std::vector<u8>& buffer)
|
||||||
{
|
{
|
||||||
Core::RunOnCPUThread(
|
Core::RunOnCPUThread(
|
||||||
[&] {
|
[&] {
|
||||||
|
INFO_LOG(SLIPPI, "at start of save to buffer call");
|
||||||
u8* ptr = nullptr;
|
u8* ptr = nullptr;
|
||||||
PointerWrap p(&ptr, PointerWrap::MODE_MEASURE);
|
PointerWrap p(&ptr, PointerWrap::MODE_MEASURE);
|
||||||
|
|
||||||
DoState(p);
|
DoState(p);
|
||||||
const size_t buffer_size = reinterpret_cast<size_t>(ptr);
|
const size_t buffer_size = reinterpret_cast<size_t>(ptr);
|
||||||
buffer.resize(buffer_size);
|
buffer.resize(buffer_size);
|
||||||
|
|
||||||
ptr = &buffer[0];
|
ptr = &buffer[0];
|
||||||
p.SetMode(PointerWrap::MODE_WRITE);
|
p.SetMode(PointerWrap::MODE_WRITE);
|
||||||
DoState(p);
|
DoState(p);
|
||||||
|
INFO_LOG(SLIPPI, "at end of save to buffer call");
|
||||||
},
|
},
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,6 +264,9 @@ void VideoBackendBase::PopulateBackendInfoFromUI()
|
||||||
|
|
||||||
void VideoBackendBase::DoState(PointerWrap& p)
|
void VideoBackendBase::DoState(PointerWrap& p)
|
||||||
{
|
{
|
||||||
|
#ifdef IS_PLAYBACK
|
||||||
|
VideoCommon_DoState(p);
|
||||||
|
#else
|
||||||
if (!SConfig::GetInstance().bCPUThread)
|
if (!SConfig::GetInstance().bCPUThread)
|
||||||
{
|
{
|
||||||
VideoCommon_DoState(p);
|
VideoCommon_DoState(p);
|
||||||
|
@ -278,6 +281,7 @@ void VideoBackendBase::DoState(PointerWrap& p)
|
||||||
// Let the GPU thread sleep after loading the state, so we're not spinning if paused after loading
|
// Let the GPU thread sleep after loading the state, so we're not spinning if paused after loading
|
||||||
// a state. The next GP burst will wake it up again.
|
// a state. The next GP burst will wake it up again.
|
||||||
Fifo::GpuMaySleep();
|
Fifo::GpuMaySleep();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoBackendBase::InitializeShared()
|
void VideoBackendBase::InitializeShared()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue