chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.
Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.
The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.
Following REUSE has a few advantages over the current approach:
- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
`.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
files like binary assets / images is always accurate and up to date
To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.
[REUSE]: https://reuse.software
Follow-up to 01cf05bc75b1e47beb08937439f3ed9339e7b254
2022-05-15 01:06:02 +01:00
|
|
|
|
// SPDX-FileCopyrightText: 2016 Citra Emulator Project
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2016-07-29 13:45:49 +01:00
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2017-01-22 19:02:29 +00:00
|
|
|
|
#include <array>
|
2016-09-20 16:21:23 +01:00
|
|
|
|
#include <memory>
|
2018-10-30 04:03:25 +00:00
|
|
|
|
|
2016-07-29 13:45:49 +01:00
|
|
|
|
#include <QKeyEvent>
|
2020-10-27 17:33:25 +00:00
|
|
|
|
#include <QList>
|
2020-08-27 20:16:47 +01:00
|
|
|
|
#include <QWidget>
|
2018-10-30 04:03:25 +00:00
|
|
|
|
|
2021-09-03 02:40:55 +01:00
|
|
|
|
namespace Core {
|
|
|
|
|
class System;
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-15 20:26:29 +01:00
|
|
|
|
class QCheckBox;
|
2016-07-29 13:45:49 +01:00
|
|
|
|
class QString;
|
|
|
|
|
class QTimer;
|
|
|
|
|
|
2020-10-27 17:33:25 +00:00
|
|
|
|
class ConfigureInputAdvanced;
|
|
|
|
|
class ConfigureInputPlayer;
|
|
|
|
|
|
2020-09-23 14:52:25 +01:00
|
|
|
|
class InputProfiles;
|
|
|
|
|
|
2020-08-27 20:16:47 +01:00
|
|
|
|
namespace InputCommon {
|
|
|
|
|
class InputSubsystem;
|
|
|
|
|
}
|
|
|
|
|
|
2016-07-29 13:45:49 +01:00
|
|
|
|
namespace Ui {
|
2016-09-18 01:38:01 +01:00
|
|
|
|
class ConfigureInput;
|
2016-07-29 13:45:49 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-09-03 02:40:55 +01:00
|
|
|
|
void OnDockedModeChanged(bool last_state, bool new_state, Core::System& system);
|
2018-12-05 03:01:01 +00:00
|
|
|
|
|
2020-07-22 15:39:53 +01:00
|
|
|
|
class ConfigureInput : public QWidget {
|
2016-07-29 13:45:49 +01:00
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2021-09-03 02:40:55 +01:00
|
|
|
|
explicit ConfigureInput(Core::System& system_, QWidget* parent = nullptr);
|
2018-12-02 19:06:39 +00:00
|
|
|
|
~ConfigureInput() override;
|
2016-07-29 13:45:49 +01:00
|
|
|
|
|
2020-08-27 20:16:47 +01:00
|
|
|
|
/// Initializes the input dialog with the given input subsystem.
|
2020-08-21 12:39:24 +01:00
|
|
|
|
void Initialize(InputCommon::InputSubsystem* input_subsystem_, std::size_t max_players = 8);
|
2020-08-27 20:16:47 +01:00
|
|
|
|
|
2020-07-22 15:39:53 +01:00
|
|
|
|
/// Save all button configurations to settings file.
|
2019-05-26 05:39:23 +01:00
|
|
|
|
void ApplyConfiguration();
|
2016-07-29 13:45:49 +01:00
|
|
|
|
|
2020-07-22 15:39:53 +01:00
|
|
|
|
QList<QWidget*> GetSubTabs() const;
|
|
|
|
|
|
2016-07-29 13:45:49 +01:00
|
|
|
|
private:
|
2019-06-05 23:39:46 +01:00
|
|
|
|
void changeEvent(QEvent* event) override;
|
|
|
|
|
void RetranslateUI();
|
2020-07-22 15:39:53 +01:00
|
|
|
|
void ClearAll();
|
2019-06-05 23:39:46 +01:00
|
|
|
|
|
2020-07-22 15:39:53 +01:00
|
|
|
|
void UpdateDockedState(bool is_handheld);
|
|
|
|
|
void UpdateAllInputDevices();
|
2020-10-29 16:15:35 +00:00
|
|
|
|
void UpdateAllInputProfiles(std::size_t player_index);
|
2017-12-06 04:26:29 +00:00
|
|
|
|
|
2016-12-09 23:59:09 +00:00
|
|
|
|
/// Load configuration settings.
|
2019-05-26 05:39:23 +01:00
|
|
|
|
void LoadConfiguration();
|
2019-06-05 23:39:46 +01:00
|
|
|
|
void LoadPlayerControllerIndices();
|
|
|
|
|
|
2016-07-29 13:45:49 +01:00
|
|
|
|
/// Restore all buttons to their default values.
|
2019-05-26 05:39:23 +01:00
|
|
|
|
void RestoreDefaults();
|
2018-08-26 09:23:12 +01:00
|
|
|
|
|
2018-11-02 02:06:48 +00:00
|
|
|
|
std::unique_ptr<Ui::ConfigureInput> ui;
|
2017-12-06 04:26:29 +00:00
|
|
|
|
|
2020-09-23 14:52:25 +01:00
|
|
|
|
std::unique_ptr<InputProfiles> profiles;
|
|
|
|
|
|
2020-07-22 15:39:53 +01:00
|
|
|
|
std::array<ConfigureInputPlayer*, 8> player_controllers;
|
|
|
|
|
std::array<QWidget*, 8> player_tabs;
|
|
|
|
|
std::array<QCheckBox*, 8> player_connected;
|
|
|
|
|
ConfigureInputAdvanced* advanced;
|
2021-09-03 02:40:55 +01:00
|
|
|
|
|
|
|
|
|
Core::System& system;
|
2016-07-29 13:45:49 +01:00
|
|
|
|
};
|