citra_qt: Rebuilt movie frontend

This is completely rebuilt, in order to allow setting author, displaying movie metadata, and toggling read-only mode.

The UX is changed to more closely match other emulators' behaviour. Now you can only record/play from start/reset (In the future, we might want to introduce 'record from savestate')

Also fixed a critical bug where movie file can be corrupted when ending the recording while game is still running.
This commit is contained in:
zhupengfei 2020-07-06 21:44:17 +08:00
parent 5a42a80f40
commit 113e0c7331
No known key found for this signature in database
GPG key ID: DD129E108BD09378
14 changed files with 541 additions and 151 deletions

View file

@ -12,7 +12,6 @@
#include "common/logging/log.h"
#include "core/3ds.h"
#include "core/core.h"
#include "core/core_timing.h"
#include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/event.h"
#include "core/hle/kernel/handle_table.h"
@ -55,11 +54,6 @@ void Module::serialize(Archive& ar, const unsigned int file_version) {
}
SERIALIZE_IMPL(Module)
// Updating period for each HID device. These empirical values are measured from a 11.2 3DS.
constexpr u64 pad_update_ticks = BASE_CLOCK_RATE_ARM11 / 234;
constexpr u64 accelerometer_update_ticks = BASE_CLOCK_RATE_ARM11 / 104;
constexpr u64 gyroscope_update_ticks = BASE_CLOCK_RATE_ARM11 / 101;
constexpr float accelerometer_coef = 512.0f; // measured from hw test result
constexpr float gyroscope_coef = 14.375f; // got from hwtest GetGyroscopeLowRawToDpsCoefficient call

View file

@ -13,6 +13,7 @@
#include "common/bit_field.h"
#include "common/common_funcs.h"
#include "common/common_types.h"
#include "core/core_timing.h"
#include "core/frontend/input.h"
#include "core/hle/service/service.h"
#include "core/settings.h"
@ -299,6 +300,11 @@ public:
const PadState& GetState() const;
// Updating period for each HID device. These empirical values are measured from a 11.2 3DS.
static constexpr u64 pad_update_ticks = BASE_CLOCK_RATE_ARM11 / 234;
static constexpr u64 accelerometer_update_ticks = BASE_CLOCK_RATE_ARM11 / 104;
static constexpr u64 gyroscope_update_ticks = BASE_CLOCK_RATE_ARM11 / 101;
private:
void LoadInputDevices();
void UpdatePadCallback(u64 userdata, s64 cycles_late);