Manually tweak source formatting and then re-run clang-format

This commit is contained in:
Yuri Kunde Schlesner 2016-09-18 18:01:46 -07:00
parent 784b96d87f
commit 396a8d91a4
169 changed files with 805 additions and 809 deletions

View File

@ -23,7 +23,7 @@ StereoBuffer16 DecodeADPCM(const u8* const data, const size_t sample_count,
constexpr size_t FRAME_LEN = 8; constexpr size_t FRAME_LEN = 8;
constexpr size_t SAMPLES_PER_FRAME = 14; constexpr size_t SAMPLES_PER_FRAME = 14;
constexpr std::array<int, 16> SIGNED_NIBBLES{ constexpr std::array<int, 16> SIGNED_NIBBLES = {
{0, 1, 2, 3, 4, 5, 6, 7, -8, -7, -6, -5, -4, -3, -2, -1}}; {0, 1, 2, 3, 4, 5, 6, 7, -8, -7, -6, -5, -4, -3, -2, -1}};
const size_t ret_size = const size_t ret_size =

View File

@ -49,7 +49,8 @@ static SharedMemory& WriteRegion() {
static std::array<Source, num_sources> sources = { static std::array<Source, num_sources> sources = {
Source(0), Source(1), Source(2), Source(3), Source(4), Source(5), Source(6), Source(7), Source(0), Source(1), Source(2), Source(3), Source(4), Source(5), Source(6), Source(7),
Source(8), Source(9), Source(10), Source(11), Source(12), Source(13), Source(14), Source(15), Source(8), Source(9), Source(10), Source(11), Source(12), Source(13), Source(14), Source(15),
Source(16), Source(17), Source(18), Source(19), Source(20), Source(21), Source(22), Source(23)}; Source(16), Source(17), Source(18), Source(19), Source(20), Source(21), Source(22), Source(23),
};
static Mixers mixers; static Mixers mixers;
static StereoFrame16 GenerateCurrentFrame() { static StereoFrame16 GenerateCurrentFrame() {

View File

@ -23,16 +23,15 @@ class Sink;
namespace DSP { namespace DSP {
namespace HLE { namespace HLE {
// The application-accessible region of DSP memory consists of two parts. // The application-accessible region of DSP memory consists of two parts. Both are marked as IO and
// Both are marked as IO and have Read/Write permissions. // have Read/Write permissions.
// //
// First Region: 0x1FF50000 (Size: 0x8000) // First Region: 0x1FF50000 (Size: 0x8000)
// Second Region: 0x1FF70000 (Size: 0x8000) // Second Region: 0x1FF70000 (Size: 0x8000)
// //
// The DSP reads from each region alternately based on the frame counter for each region much like a // The DSP reads from each region alternately based on the frame counter for each region much like a
// double-buffer. The frame counter is located as the very last u16 of each region and is // double-buffer. The frame counter is located as the very last u16 of each region and is
// incremented // incremented each audio tick.
// each audio tick.
constexpr VAddr region0_base = 0x1FF50000; constexpr VAddr region0_base = 0x1FF50000;
constexpr VAddr region1_base = 0x1FF70000; constexpr VAddr region1_base = 0x1FF70000;
@ -92,14 +91,12 @@ static_assert(std::is_trivially_copyable<u32_dsp>::value, "u32_dsp isn't trivial
// See also: DSP::HLE::PipeRead. // See also: DSP::HLE::PipeRead.
// //
// Note that the above addresses do vary slightly between audio firmwares observed; the addresses // Note that the above addresses do vary slightly between audio firmwares observed; the addresses
// are // are not fixed in stone. The addresses above are only an examplar; they're what this
// not fixed in stone. The addresses above are only an examplar; they're what this implementation // implementation does and provides to applications.
// does and provides to applications.
// //
// Application requests the DSP service to convert DSP addresses into ARM11 virtual addresses using // Application requests the DSP service to convert DSP addresses into ARM11 virtual addresses using
// the // the ConvertProcessAddressFromDspDram service call. Applications seem to derive the addresses for
// ConvertProcessAddressFromDspDram service call. Applications seem to derive the addresses for the // the second region via:
// second region via:
// second_region_dsp_addr = first_region_dsp_addr | 0x10000 // second_region_dsp_addr = first_region_dsp_addr | 0x10000
// //
// Applications maintain most of its own audio state, the memory region is used mainly for // Applications maintain most of its own audio state, the memory region is used mainly for
@ -137,8 +134,8 @@ struct SourceConfiguration {
BitField<0, 1, u32_le> format_dirty; BitField<0, 1, u32_le> format_dirty;
BitField<1, 1, u32_le> mono_or_stereo_dirty; BitField<1, 1, u32_le> mono_or_stereo_dirty;
BitField<2, 1, u32_le> adpcm_coefficients_dirty; BitField<2, 1, u32_le> adpcm_coefficients_dirty;
BitField<3, 1, u32_le> /// Tends to be set when a looped buffer is queued.
partial_embedded_buffer_dirty; ///< Tends to be set when a looped buffer is queued. BitField<3, 1, u32_le> partial_embedded_buffer_dirty;
BitField<4, 1, u32_le> partial_reset_flag; BitField<4, 1, u32_le> partial_reset_flag;
BitField<16, 1, u32_le> enable_dirty; BitField<16, 1, u32_le> enable_dirty;
@ -146,8 +143,8 @@ struct SourceConfiguration {
BitField<18, 1, u32_le> rate_multiplier_dirty; BitField<18, 1, u32_le> rate_multiplier_dirty;
BitField<19, 1, u32_le> buffer_queue_dirty; BitField<19, 1, u32_le> buffer_queue_dirty;
BitField<20, 1, u32_le> loop_related_dirty; BitField<20, 1, u32_le> loop_related_dirty;
BitField<21, 1, u32_le> /// Tends to also be set when embedded buffer is updated.
play_position_dirty; ///< Tends to also be set when embedded buffer is updated. BitField<21, 1, u32_le> play_position_dirty;
BitField<22, 1, u32_le> filters_enabled_dirty; BitField<22, 1, u32_le> filters_enabled_dirty;
BitField<23, 1, u32_le> simple_filter_dirty; BitField<23, 1, u32_le> simple_filter_dirty;
BitField<24, 1, u32_le> biquad_filter_dirty; BitField<24, 1, u32_le> biquad_filter_dirty;
@ -162,9 +159,9 @@ struct SourceConfiguration {
// Gain control // Gain control
/** /**
* Gain is between 0.0-1.0. This determines how much will this source appear on * Gain is between 0.0-1.0. This determines how much will this source appear on each of the
* each of the 12 channels that feed into the intermediate mixers. * 12 channels that feed into the intermediate mixers. Each of the three intermediate mixers
* Each of the three intermediate mixers is fed two left and two right channels. * is fed two left and two right channels.
*/ */
float_le gain[3][4]; float_le gain[3][4];
@ -173,7 +170,11 @@ struct SourceConfiguration {
/// Multiplier for sample rate. Resampling occurs with the selected interpolation method. /// Multiplier for sample rate. Resampling occurs with the selected interpolation method.
float_le rate_multiplier; float_le rate_multiplier;
enum class InterpolationMode : u8 { Polyphase = 0, Linear = 1, None = 2 }; enum class InterpolationMode : u8 {
Polyphase = 0,
Linear = 1,
None = 2,
};
InterpolationMode interpolation_mode; InterpolationMode interpolation_mode;
INSERT_PADDING_BYTES(1); ///< Interpolation related INSERT_PADDING_BYTES(1); ///< Interpolation related
@ -197,8 +198,7 @@ struct SourceConfiguration {
* The transfer function of this filter is: * The transfer function of this filter is:
* H(z) = (b0 + b1 z^-1 + b2 z^-2) / (1 - a1 z^-1 - a2 z^-2) * H(z) = (b0 + b1 z^-1 + b2 z^-2) / (1 - a1 z^-1 - a2 z^-2)
* Nintendo chose to negate the feedbackward coefficients. This differs from standard * Nintendo chose to negate the feedbackward coefficients. This differs from standard
* notation * notation as in: https://ccrma.stanford.edu/~jos/filters/Direct_Form_I.html
* as in: https://ccrma.stanford.edu/~jos/filters/Direct_Form_I.html
* Values are signed fixed point with 14 fractional bits. * Values are signed fixed point with 14 fractional bits.
*/ */
struct BiquadFilter { struct BiquadFilter {
@ -246,8 +246,8 @@ struct SourceConfiguration {
u8 is_looping; u8 is_looping;
/// This value is shown in SourceStatus::previous_buffer_id when this buffer has /// This value is shown in SourceStatus::previous_buffer_id when this buffer has
/// finished. /// finished. This allows the emulated application to tell what buffer is currently
/// This allows the emulated application to tell what buffer is currently playing /// playing.
u16_le buffer_id; u16_le buffer_id;
INSERT_PADDING_DSPWORDS(1); INSERT_PADDING_DSPWORDS(1);
@ -275,9 +275,16 @@ struct SourceConfiguration {
/// Note a sample takes up different number of bytes in different buffer formats. /// Note a sample takes up different number of bytes in different buffer formats.
u32_dsp length; u32_dsp length;
enum class MonoOrStereo : u16_le { Mono = 1, Stereo = 2 }; enum class MonoOrStereo : u16_le {
Mono = 1,
Stereo = 2,
};
enum class Format : u16_le { PCM8 = 0, PCM16 = 1, ADPCM = 2 }; enum class Format : u16_le {
PCM8 = 0,
PCM16 = 1,
ADPCM = 2,
};
union { union {
u16_le flags1_raw; u16_le flags1_raw;
@ -349,12 +356,16 @@ struct DspConfiguration {
}; };
/// The DSP has three intermediate audio mixers. This controls the volume level (0.0-1.0) for /// The DSP has three intermediate audio mixers. This controls the volume level (0.0-1.0) for
/// each at the final mixer /// each at the final mixer.
float_le volume[3]; float_le volume[3];
INSERT_PADDING_DSPWORDS(3); INSERT_PADDING_DSPWORDS(3);
enum class OutputFormat : u16_le { Mono = 0, Stereo = 1, Surround = 2 }; enum class OutputFormat : u16_le {
Mono = 0,
Stereo = 1,
Surround = 2,
};
OutputFormat output_format; OutputFormat output_format;
@ -386,9 +397,10 @@ struct DspConfiguration {
u16_le enable; u16_le enable;
INSERT_PADDING_DSPWORDS(1); INSERT_PADDING_DSPWORDS(1);
u16_le outputs; u16_le outputs;
u32_dsp work_buffer_address; ///< The application allocates a block of memory for the DSP to /// The application allocates a block of memory for the DSP to use as a work buffer.
/// use as a work buffer. u32_dsp work_buffer_address;
u16_le frame_count; ///< Frames to delay by /// Frames to delay by
u16_le frame_count;
// Coefficients // Coefficients
s16_le g; ///< Fixed point with 7 fractional bits s16_le g; ///< Fixed point with 7 fractional bits

View File

@ -61,6 +61,7 @@ void SourceFilters::SimpleFilter::Reset() {
void SourceFilters::SimpleFilter::Configure( void SourceFilters::SimpleFilter::Configure(
SourceConfiguration::Configuration::SimpleFilter config) { SourceConfiguration::Configuration::SimpleFilter config) {
a1 = config.a1; a1 = config.a1;
b0 = config.b0; b0 = config.b0;
} }
@ -91,6 +92,7 @@ void SourceFilters::BiquadFilter::Reset() {
void SourceFilters::BiquadFilter::Configure( void SourceFilters::BiquadFilter::Configure(
SourceConfiguration::Configuration::BiquadFilter config) { SourceConfiguration::Configuration::BiquadFilter config) {
a1 = config.a1; a1 = config.a1;
a2 = config.a2; a2 = config.a2;
b0 = config.b0; b0 = config.b0;

View File

@ -77,9 +77,8 @@ void Mixers::ParseConfig(DspConfiguration& config) {
if (config.headphones_connected_dirty) { if (config.headphones_connected_dirty) {
config.headphones_connected_dirty.Assign(0); config.headphones_connected_dirty.Assign(0);
// Do nothing. // Do nothing. (Note: Whether headphones are connected does affect coefficients used for
// (Note: Whether headphones are connected does affect coefficients used for surround // surround sound.)
// sound.)
LOG_TRACE(Audio_DSP, "mixers headphones_connected=%hu", config.headphones_connected); LOG_TRACE(Audio_DSP, "mixers headphones_connected=%hu", config.headphones_connected);
} }

View File

@ -97,7 +97,8 @@ static void AudioPipeWriteStructAddresses() {
0x8000 + offsetof(SharedMemory, unknown11) / 2, 0x8000 + offsetof(SharedMemory, unknown11) / 2,
0x8000 + offsetof(SharedMemory, unknown12) / 2, 0x8000 + offsetof(SharedMemory, unknown12) / 2,
0x8000 + offsetof(SharedMemory, unknown13) / 2, 0x8000 + offsetof(SharedMemory, unknown13) / 2,
0x8000 + offsetof(SharedMemory, unknown14) / 2}; 0x8000 + offsetof(SharedMemory, unknown14) / 2,
};
// Begin with a u16 denoting the number of structs. // Begin with a u16 denoting the number of structs.
WriteU16(DspPipe::Audio, static_cast<u16>(struct_addresses.size())); WriteU16(DspPipe::Audio, static_cast<u16>(struct_addresses.size()));
@ -118,7 +119,12 @@ void PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer) {
return; return;
} }
enum class StateChange { Initalize = 0, Shutdown = 1, Wakeup = 2, Sleep = 3 }; enum class StateChange {
Initalize = 0,
Shutdown = 1,
Wakeup = 2,
Sleep = 3,
};
// The difference between Initialize and Wakeup is that Input state is maintained // The difference between Initialize and Wakeup is that Input state is maintained
// when sleeping but isn't when turning it off and on again. (TODO: Implement this.) // when sleeping but isn't when turning it off and on again. (TODO: Implement this.)

View File

@ -15,7 +15,12 @@ namespace HLE {
/// Reset the pipes by setting pipe positions back to the beginning. /// Reset the pipes by setting pipe positions back to the beginning.
void ResetPipes(); void ResetPipes();
enum class DspPipe { Debug = 0, Dma = 1, Audio = 2, Binary = 3 }; enum class DspPipe {
Debug = 0,
Dma = 1,
Audio = 2,
Binary = 3,
};
constexpr size_t NUM_DSP_PIPE = 8; constexpr size_t NUM_DSP_PIPE = 8;
/** /**
@ -46,7 +51,12 @@ size_t GetPipeReadableSize(DspPipe pipe_number);
*/ */
void PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer); void PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer);
enum class DspState { Off, On, Sleeping }; enum class DspState {
Off,
On,
Sleeping,
};
/// Get the state of the DSP /// Get the state of the DSP
DspState GetDspState(); DspState GetDspState();

View File

@ -163,7 +163,8 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
if (config.embedded_buffer_dirty) { if (config.embedded_buffer_dirty) {
config.embedded_buffer_dirty.Assign(0); config.embedded_buffer_dirty.Assign(0);
state.input_queue.emplace(Buffer{config.physical_address, state.input_queue.emplace(Buffer{
config.physical_address,
config.length, config.length,
static_cast<u8>(config.adpcm_ps), static_cast<u8>(config.adpcm_ps),
{config.adpcm_yn[0], config.adpcm_yn[1]}, {config.adpcm_yn[0], config.adpcm_yn[1]},
@ -172,7 +173,8 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
config.buffer_id, config.buffer_id,
state.mono_or_stereo, state.mono_or_stereo,
state.format, state.format,
false}); false,
});
LOG_TRACE(Audio_DSP, "enqueuing embedded addr=0x%08x len=%u id=%hu", LOG_TRACE(Audio_DSP, "enqueuing embedded addr=0x%08x len=%u id=%hu",
config.physical_address, config.length, config.buffer_id); config.physical_address, config.length, config.buffer_id);
} }
@ -182,7 +184,8 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
for (size_t i = 0; i < 4; i++) { for (size_t i = 0; i < 4; i++) {
if (config.buffers_dirty & (1 << i)) { if (config.buffers_dirty & (1 << i)) {
const auto& b = config.buffers[i]; const auto& b = config.buffers[i];
state.input_queue.emplace(Buffer{b.physical_address, state.input_queue.emplace(Buffer{
b.physical_address,
b.length, b.length,
static_cast<u8>(b.adpcm_ps), static_cast<u8>(b.adpcm_ps),
{b.adpcm_yn[0], b.adpcm_yn[1]}, {b.adpcm_yn[0], b.adpcm_yn[1]},
@ -191,7 +194,8 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
b.buffer_id, b.buffer_id,
state.mono_or_stereo, state.mono_or_stereo,
state.format, state.format,
true}); true,
});
LOG_TRACE(Audio_DSP, "enqueuing queued %zu addr=0x%08x len=%u id=%hu", i, LOG_TRACE(Audio_DSP, "enqueuing queued %zu addr=0x%08x len=%u id=%hu", i,
b.physical_address, b.length, b.buffer_id); b.physical_address, b.length, b.buffer_id);
} }

View File

@ -71,14 +71,16 @@ StereoBuffer16 None(State& state, const StereoBuffer16& input, float rate_multip
StereoBuffer16 Linear(State& state, const StereoBuffer16& input, float rate_multiplier) { StereoBuffer16 Linear(State& state, const StereoBuffer16& input, float rate_multiplier) {
// Note on accuracy: Some values that this produces are +/- 1 from the actual firmware. // Note on accuracy: Some values that this produces are +/- 1 from the actual firmware.
return StepOverSamples(state, input, rate_multiplier, [](u64 fraction, const auto& x0, return StepOverSamples(state, input, rate_multiplier,
const auto& x1, const auto& x2) { [](u64 fraction, const auto& x0, const auto& x1, const auto& x2) {
// This is a saturated subtraction. (Verified by black-box fuzzing.) // This is a saturated subtraction. (Verified by black-box fuzzing.)
s64 delta0 = MathUtil::Clamp<s64>(x1[0] - x0[0], -32768, 32767); s64 delta0 = MathUtil::Clamp<s64>(x1[0] - x0[0], -32768, 32767);
s64 delta1 = MathUtil::Clamp<s64>(x1[1] - x0[1], -32768, 32767); s64 delta1 = MathUtil::Clamp<s64>(x1[1] - x0[1], -32768, 32767);
return std::array<s16, 2>{static_cast<s16>(x0[0] + fraction * delta0 / scale_factor), return std::array<s16, 2>{
static_cast<s16>(x0[1] + fraction * delta1 / scale_factor)}; static_cast<s16>(x0[0] + fraction * delta0 / scale_factor),
static_cast<s16>(x0[1] + fraction * delta1 / scale_factor),
};
}); });
} }

View File

@ -19,8 +19,7 @@ public:
return native_sample_rate; return native_sample_rate;
} }
void EnqueueSamples(const s16*, size_t) override { void EnqueueSamples(const s16*, size_t) override {}
}
size_t SamplesInQueue() const override { size_t SamplesInQueue() const override {
return 0; return 0;

View File

@ -12,8 +12,8 @@ namespace AudioCore {
/** /**
* This class is an interface for an audio sink. An audio sink accepts samples in stereo signed * This class is an interface for an audio sink. An audio sink accepts samples in stereo signed
* PCM16 format to be output. * PCM16 format to be output. Sinks *do not* handle resampling and expect the correct sample rate.
* Sinks *do not* handle resampling and expect the correct sample rate. They are dumb outputs. * They are dumb outputs.
*/ */
class Sink { class Sink {
public: public:

View File

@ -14,8 +14,7 @@ class Sink;
struct SinkDetails { struct SinkDetails {
SinkDetails(const char* id_, std::function<std::unique_ptr<Sink>()> factory_) SinkDetails(const char* id_, std::function<std::unique_ptr<Sink>()> factory_)
: id(id_), factory(factory_) { : id(id_), factory(factory_) {}
}
/// Name for this sink. /// Name for this sink.
const char* id; const char* id;

View File

@ -69,10 +69,12 @@ int main(int argc, char** argv) {
#endif #endif
std::string boot_filename; std::string boot_filename;
static struct option long_options[] = {{"gdbport", required_argument, 0, 'g'}, static struct option long_options[] = {
{"gdbport", required_argument, 0, 'g'},
{"help", no_argument, 0, 'h'}, {"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'v'}, {"version", no_argument, 0, 'v'},
{0, 0, 0, 0}}; {0, 0, 0, 0},
};
while (optind < argc) { while (optind < argc) {
char arg = getopt_long(argc, argv, "g:hv", long_options, &option_index); char arg = getopt_long(argc, argv, "g:hv", long_options, &option_index);

View File

@ -181,5 +181,6 @@ void EmuWindow_SDL2::ReloadSetKeymaps() {
void EmuWindow_SDL2::OnMinimalClientAreaChangeRequest( void EmuWindow_SDL2::OnMinimalClientAreaChangeRequest(
const std::pair<unsigned, unsigned>& minimal_size) { const std::pair<unsigned, unsigned>& minimal_size) {
SDL_SetWindowMinimumSize(render_window, minimal_size.first, minimal_size.second); SDL_SetWindowMinimumSize(render_window, minimal_size.first, minimal_size.second);
} }

View File

@ -47,8 +47,8 @@ private:
void OnResize(); void OnResize();
/// Called when a configuration change affects the minimal size of the window /// Called when a configuration change affects the minimal size of the window
void void OnMinimalClientAreaChangeRequest(
OnMinimalClientAreaChangeRequest(const std::pair<unsigned, unsigned>& minimal_size) override; const std::pair<unsigned, unsigned>& minimal_size) override;
/// Is the window still open? /// Is the window still open?
bool is_open = true; bool is_open = true;

View File

@ -28,8 +28,7 @@
#define COPYRIGHT "Copyright (C) 2013-2014 Citra Team" #define COPYRIGHT "Copyright (C) 2013-2014 Citra Team"
EmuThread::EmuThread(GRenderWindow* render_window) EmuThread::EmuThread(GRenderWindow* render_window)
: exec_step(false), running(false), stop_run(false), render_window(render_window) { : exec_step(false), running(false), stop_run(false), render_window(render_window) {}
}
void EmuThread::run() { void EmuThread::run() {
render_window->MakeCurrent(); render_window->MakeCurrent();
@ -84,8 +83,7 @@ void EmuThread::run() {
class GGLWidgetInternal : public QGLWidget { class GGLWidgetInternal : public QGLWidget {
public: public:
GGLWidgetInternal(QGLFormat fmt, GRenderWindow* parent) GGLWidgetInternal(QGLFormat fmt, GRenderWindow* parent)
: QGLWidget(fmt, parent), parent(parent) { : QGLWidget(fmt, parent), parent(parent) {}
}
void paintEvent(QPaintEvent* ev) override { void paintEvent(QPaintEvent* ev) override {
if (do_painting) { if (do_painting) {
@ -153,8 +151,7 @@ void GRenderWindow::DoneCurrent() {
child->doneCurrent(); child->doneCurrent();
} }
void GRenderWindow::PollEvents() { void GRenderWindow::PollEvents() {}
}
// On Qt 5.0+, this correctly gets the size of the framebuffer (pixels). // On Qt 5.0+, this correctly gets the size of the framebuffer (pixels).
// //
@ -306,8 +303,8 @@ void GRenderWindow::OnEmulationStopping() {
void GRenderWindow::showEvent(QShowEvent* event) { void GRenderWindow::showEvent(QShowEvent* event) {
QWidget::showEvent(event); QWidget::showEvent(event);
// windowHandle() is not initialized until the Window is shown, so we connect it here.
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
// windowHandle() is not initialized until the Window is shown, so we connect it here.
connect(this->windowHandle(), SIGNAL(screenChanged(QScreen*)), this, connect(this->windowHandle(), SIGNAL(screenChanged(QScreen*)), this,
SLOT(OnFramebufferSizeChanged()), Qt::UniqueConnection); SLOT(OnFramebufferSizeChanged()), Qt::UniqueConnection);
#endif #endif

View File

@ -144,8 +144,8 @@ signals:
void Closed(); void Closed();
private: private:
void void OnMinimalClientAreaChangeRequest(
OnMinimalClientAreaChangeRequest(const std::pair<unsigned, unsigned>& minimal_size) override; const std::pair<unsigned, unsigned>& minimal_size) override;
GGLWidgetInternal* child; GGLWidgetInternal* child;

View File

@ -22,8 +22,7 @@ ConfigureAudio::ConfigureAudio(QWidget* parent)
this->setConfiguration(); this->setConfiguration();
} }
ConfigureAudio::~ConfigureAudio() { ConfigureAudio::~ConfigureAudio() {}
}
void ConfigureAudio::setConfiguration() { void ConfigureAudio::setConfiguration() {
int new_sink_index = 0; int new_sink_index = 0;

View File

@ -12,8 +12,7 @@ ConfigureDebug::ConfigureDebug(QWidget* parent) : QWidget(parent), ui(new Ui::Co
this->setConfiguration(); this->setConfiguration();
} }
ConfigureDebug::~ConfigureDebug() { ConfigureDebug::~ConfigureDebug() {}
}
void ConfigureDebug::setConfiguration() { void ConfigureDebug::setConfiguration() {
ui->toggle_gdbstub->setChecked(Settings::values.use_gdbstub); ui->toggle_gdbstub->setChecked(Settings::values.use_gdbstub);

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "citra_qt/config.h"
#include "citra_qt/configure_dialog.h" #include "citra_qt/configure_dialog.h"
#include "citra_qt/config.h"
#include "ui_configure.h" #include "ui_configure.h"
#include "core/settings.h" #include "core/settings.h"
@ -13,11 +13,9 @@ ConfigureDialog::ConfigureDialog(QWidget* parent) : QDialog(parent), ui(new Ui::
this->setConfiguration(); this->setConfiguration();
} }
ConfigureDialog::~ConfigureDialog() { ConfigureDialog::~ConfigureDialog() {}
}
void ConfigureDialog::setConfiguration() { void ConfigureDialog::setConfiguration() {}
}
void ConfigureDialog::applyConfiguration() { void ConfigureDialog::applyConfiguration() {
ui->generalTab->applyConfiguration(); ui->generalTab->applyConfiguration();

View File

@ -11,14 +11,14 @@
ConfigureGeneral::ConfigureGeneral(QWidget* parent) ConfigureGeneral::ConfigureGeneral(QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureGeneral) { : QWidget(parent), ui(new Ui::ConfigureGeneral) {
ui->setupUi(this); ui->setupUi(this);
this->setConfiguration(); this->setConfiguration();
ui->toggle_cpu_jit->setEnabled(!System::IsPoweredOn()); ui->toggle_cpu_jit->setEnabled(!System::IsPoweredOn());
} }
ConfigureGeneral::~ConfigureGeneral() { ConfigureGeneral::~ConfigureGeneral() {}
}
void ConfigureGeneral::setConfiguration() { void ConfigureGeneral::setConfiguration() {
ui->toggle_deepscan->setChecked(UISettings::values.gamedir_deepscan); ui->toggle_deepscan->setChecked(UISettings::values.gamedir_deepscan);

View File

@ -10,14 +10,14 @@
ConfigureGraphics::ConfigureGraphics(QWidget* parent) ConfigureGraphics::ConfigureGraphics(QWidget* parent)
: QWidget(parent), ui(new Ui::ConfigureGraphics) { : QWidget(parent), ui(new Ui::ConfigureGraphics) {
ui->setupUi(this); ui->setupUi(this);
this->setConfiguration(); this->setConfiguration();
ui->toggle_vsync->setEnabled(!System::IsPoweredOn()); ui->toggle_vsync->setEnabled(!System::IsPoweredOn());
} }
ConfigureGraphics::~ConfigureGraphics() { ConfigureGraphics::~ConfigureGraphics() {}
}
void ConfigureGraphics::setConfiguration() { void ConfigureGraphics::setConfiguration() {
ui->toggle_hw_renderer->setChecked(Settings::values.use_hw_renderer); ui->toggle_hw_renderer->setChecked(Settings::values.use_hw_renderer);

View File

@ -10,34 +10,35 @@
ConfigureInput::ConfigureInput(QWidget* parent) ConfigureInput::ConfigureInput(QWidget* parent)
: QWidget(parent), ui(std::make_unique<Ui::ConfigureInput>()) { : QWidget(parent), ui(std::make_unique<Ui::ConfigureInput>()) {
ui->setupUi(this); ui->setupUi(this);
// Initialize mapping of input enum to UI button. // Initialize mapping of input enum to UI button.
input_mapping = { input_mapping = {
{std::make_pair(Settings::NativeInput::Values::A, ui->buttonA)}, {Settings::NativeInput::Values::A, ui->buttonA},
{std::make_pair(Settings::NativeInput::Values::B, ui->buttonB)}, {Settings::NativeInput::Values::B, ui->buttonB},
{std::make_pair(Settings::NativeInput::Values::X, ui->buttonX)}, {Settings::NativeInput::Values::X, ui->buttonX},
{std::make_pair(Settings::NativeInput::Values::Y, ui->buttonY)}, {Settings::NativeInput::Values::Y, ui->buttonY},
{std::make_pair(Settings::NativeInput::Values::L, ui->buttonL)}, {Settings::NativeInput::Values::L, ui->buttonL},
{std::make_pair(Settings::NativeInput::Values::R, ui->buttonR)}, {Settings::NativeInput::Values::R, ui->buttonR},
{std::make_pair(Settings::NativeInput::Values::ZL, ui->buttonZL)}, {Settings::NativeInput::Values::ZL, ui->buttonZL},
{std::make_pair(Settings::NativeInput::Values::ZR, ui->buttonZR)}, {Settings::NativeInput::Values::ZR, ui->buttonZR},
{std::make_pair(Settings::NativeInput::Values::START, ui->buttonStart)}, {Settings::NativeInput::Values::START, ui->buttonStart},
{std::make_pair(Settings::NativeInput::Values::SELECT, ui->buttonSelect)}, {Settings::NativeInput::Values::SELECT, ui->buttonSelect},
{std::make_pair(Settings::NativeInput::Values::HOME, ui->buttonHome)}, {Settings::NativeInput::Values::HOME, ui->buttonHome},
{std::make_pair(Settings::NativeInput::Values::DUP, ui->buttonDpadUp)}, {Settings::NativeInput::Values::DUP, ui->buttonDpadUp},
{std::make_pair(Settings::NativeInput::Values::DDOWN, ui->buttonDpadDown)}, {Settings::NativeInput::Values::DDOWN, ui->buttonDpadDown},
{std::make_pair(Settings::NativeInput::Values::DLEFT, ui->buttonDpadLeft)}, {Settings::NativeInput::Values::DLEFT, ui->buttonDpadLeft},
{std::make_pair(Settings::NativeInput::Values::DRIGHT, ui->buttonDpadRight)}, {Settings::NativeInput::Values::DRIGHT, ui->buttonDpadRight},
{std::make_pair(Settings::NativeInput::Values::CUP, ui->buttonCStickUp)}, {Settings::NativeInput::Values::CUP, ui->buttonCStickUp},
{std::make_pair(Settings::NativeInput::Values::CDOWN, ui->buttonCStickDown)}, {Settings::NativeInput::Values::CDOWN, ui->buttonCStickDown},
{std::make_pair(Settings::NativeInput::Values::CLEFT, ui->buttonCStickLeft)}, {Settings::NativeInput::Values::CLEFT, ui->buttonCStickLeft},
{std::make_pair(Settings::NativeInput::Values::CRIGHT, ui->buttonCStickRight)}, {Settings::NativeInput::Values::CRIGHT, ui->buttonCStickRight},
{std::make_pair(Settings::NativeInput::Values::CIRCLE_UP, ui->buttonCircleUp)}, {Settings::NativeInput::Values::CIRCLE_UP, ui->buttonCircleUp},
{std::make_pair(Settings::NativeInput::Values::CIRCLE_DOWN, ui->buttonCircleDown)}, {Settings::NativeInput::Values::CIRCLE_DOWN, ui->buttonCircleDown},
{std::make_pair(Settings::NativeInput::Values::CIRCLE_LEFT, ui->buttonCircleLeft)}, {Settings::NativeInput::Values::CIRCLE_LEFT, ui->buttonCircleLeft},
{std::make_pair(Settings::NativeInput::Values::CIRCLE_RIGHT, ui->buttonCircleRight)}, {Settings::NativeInput::Values::CIRCLE_RIGHT, ui->buttonCircleRight},
{std::make_pair(Settings::NativeInput::Values::CIRCLE_MODIFIER, ui->buttonCircleMod)}, {Settings::NativeInput::Values::CIRCLE_MODIFIER, ui->buttonCircleMod},
}; };
// Attach handle click method to each button click. // Attach handle click method to each button click.

View File

@ -10,7 +10,9 @@
#include "core/hle/service/fs/archive.h" #include "core/hle/service/fs/archive.h"
#include "core/system.h" #include "core/system.h"
static const std::array<int, 12> days_in_month = {{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}}; static const std::array<int, 12> days_in_month = {{
31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31,
}};
ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) { ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) {
ui->setupUi(this); ui->setupUi(this);
@ -20,8 +22,7 @@ ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::
this->setConfiguration(); this->setConfiguration();
} }
ConfigureSystem::~ConfigureSystem() { ConfigureSystem::~ConfigureSystem() {}
}
void ConfigureSystem::setConfiguration() { void ConfigureSystem::setConfiguration() {
enabled = !System::IsPoweredOn(); enabled = !System::IsPoweredOn();
@ -51,8 +52,8 @@ void ConfigureSystem::setConfiguration() {
void ConfigureSystem::ReadSystemSettings() { void ConfigureSystem::ReadSystemSettings() {
// set username // set username
username = Service::CFG::GetUsername(); username = Service::CFG::GetUsername();
// ui->edit_username->setText(QString::fromStdU16String(username)); // TODO(wwylele): Use this // TODO(wwylele): Use this when we move to Qt 5.5
// when we move to Qt 5.5 // ui->edit_username->setText(QString::fromStdU16String(username));
ui->edit_username->setText( ui->edit_username->setText(
QString::fromUtf16(reinterpret_cast<const ushort*>(username.data()))); QString::fromUtf16(reinterpret_cast<const ushort*>(username.data())));
@ -80,8 +81,8 @@ void ConfigureSystem::applyConfiguration() {
bool modified = false; bool modified = false;
// apply username // apply username
// std::u16string new_username = ui->edit_username->text().toStdU16String(); // TODO(wwylele): // TODO(wwylele): Use this when we move to Qt 5.5
// Use this when we move to Qt 5.5 // std::u16string new_username = ui->edit_username->text().toStdU16String();
std::u16string new_username( std::u16string new_username(
reinterpret_cast<const char16_t*>(ui->edit_username->text().utf16())); reinterpret_cast<const char16_t*>(ui->edit_username->text().utf16()));
if (new_username != username) { if (new_username != username) {

View File

@ -78,8 +78,7 @@ void CallstackWidget::OnDebugModeEntered() {
} }
} }
void CallstackWidget::OnDebugModeLeft() { void CallstackWidget::OnDebugModeLeft() {}
}
void CallstackWidget::Clear() { void CallstackWidget::Clear() {
for (int row = 0; row < callstack_model->rowCount(); row++) { for (int row = 0; row < callstack_model->rowCount(); row++) {

View File

@ -19,8 +19,7 @@
DisassemblerModel::DisassemblerModel(QObject* parent) DisassemblerModel::DisassemblerModel(QObject* parent)
: QAbstractListModel(parent), base_address(0), code_size(0), program_counter(0), : QAbstractListModel(parent), base_address(0), code_size(0), program_counter(0),
selection(QModelIndex()) { selection(QModelIndex()) {}
}
int DisassemblerModel::columnCount(const QModelIndex& parent) const { int DisassemblerModel::columnCount(const QModelIndex& parent) const {
return 3; return 3;
@ -241,8 +240,7 @@ void DisassemblerWidget::OnDebugModeEntered() {
model_index, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); model_index, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
} }
void DisassemblerWidget::OnDebugModeLeft() { void DisassemblerWidget::OnDebugModeLeft() {}
}
int DisassemblerWidget::SelectedRow() { int DisassemblerWidget::SelectedRow() {
QModelIndex index = disasm_ui.treeView->selectionModel()->currentIndex(); QModelIndex index = disasm_ui.treeView->selectionModel()->currentIndex();

View File

@ -16,8 +16,7 @@
BreakPointModel::BreakPointModel(std::shared_ptr<Pica::DebugContext> debug_context, QObject* parent) BreakPointModel::BreakPointModel(std::shared_ptr<Pica::DebugContext> debug_context, QObject* parent)
: QAbstractListModel(parent), context_weak(debug_context), : QAbstractListModel(parent), context_weak(debug_context),
at_breakpoint(debug_context->at_breakpoint), at_breakpoint(debug_context->at_breakpoint),
active_breakpoint(debug_context->active_breakpoint) { active_breakpoint(debug_context->active_breakpoint) {}
}
int BreakPointModel::columnCount(const QModelIndex& parent) const { int BreakPointModel::columnCount(const QModelIndex& parent) const {
return 1; return 1;
@ -42,7 +41,8 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const {
{Pica::DebugContext::Event::IncomingDisplayTransfer, {Pica::DebugContext::Event::IncomingDisplayTransfer,
tr("Incoming display transfer")}, tr("Incoming display transfer")},
{Pica::DebugContext::Event::GSPCommandProcessed, tr("GSP command processed")}, {Pica::DebugContext::Event::GSPCommandProcessed, tr("GSP command processed")},
{Pica::DebugContext::Event::BufferSwapped, tr("Buffers swapped")}}; {Pica::DebugContext::Event::BufferSwapped, tr("Buffers swapped")},
};
DEBUG_ASSERT(map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents)); DEBUG_ASSERT(map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents));
return (map.find(event) != map.end()) ? map.at(event) : QString(); return (map.find(event) != map.end()) ? map.at(event) : QString();

View File

@ -51,8 +51,7 @@ public:
} }
}; };
GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractListModel(parent) { GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractListModel(parent) {}
}
int GPUCommandListModel::rowCount(const QModelIndex& parent) const { int GPUCommandListModel::rowCount(const QModelIndex& parent) const {
return static_cast<int>(pica_trace.writes.size()); return static_cast<int>(pica_trace.writes.size());

View File

@ -25,10 +25,8 @@
#include "video_core/utils.h" #include "video_core/utils.h"
SurfacePicture::SurfacePicture(QWidget* parent, GraphicsSurfaceWidget* surface_widget_) SurfacePicture::SurfacePicture(QWidget* parent, GraphicsSurfaceWidget* surface_widget_)
: QLabel(parent), surface_widget(surface_widget_) { : QLabel(parent), surface_widget(surface_widget_) {}
} SurfacePicture::~SurfacePicture() {}
SurfacePicture::~SurfacePicture() {
}
void SurfacePicture::mousePressEvent(QMouseEvent* event) { void SurfacePicture::mousePressEvent(QMouseEvent* event) {
// Only do something while the left mouse button is held down // Only do something while the left mouse button is held down
@ -707,9 +705,8 @@ unsigned int GraphicsSurfaceWidget::NibblesPerPixel(GraphicsSurfaceWidget::Forma
case Format::D16: case Format::D16:
return 2 * 2; return 2 * 2;
default: default:
UNREACHABLE_MSG("GraphicsSurfaceWidget::BytesPerPixel: this " UNREACHABLE_MSG("GraphicsSurfaceWidget::BytesPerPixel: this should not be reached as this "
"should not be reached as this function should " "function should be given a format which is in "
"be given a format which is in "
"GraphicsSurfaceWidget::Format. Instead got %i", "GraphicsSurfaceWidget::Format. Instead got %i",
static_cast<int>(format)); static_cast<int>(format));
return 0; return 0;

View File

@ -29,8 +29,7 @@ using nihstro::SourceRegister;
using nihstro::SwizzlePattern; using nihstro::SwizzlePattern;
GraphicsVertexShaderModel::GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent) GraphicsVertexShaderModel::GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent)
: QAbstractTableModel(parent), par(parent) { : QAbstractTableModel(parent), par(parent) {}
}
int GraphicsVertexShaderModel::columnCount(const QModelIndex& parent) const { int GraphicsVertexShaderModel::columnCount(const QModelIndex& parent) const {
return 3; return 3;

View File

@ -4,8 +4,7 @@
#include "citra_qt/debugger/ramview.h" #include "citra_qt/debugger/ramview.h"
GRamView::GRamView(QWidget* parent) : QHexEdit(parent) { GRamView::GRamView(QWidget* parent) : QHexEdit(parent) {}
}
void GRamView::OnCPUStepped() { void GRamView::OnCPUStepped() {
// TODO: QHexEdit doesn't show vertical scroll bars for > 10MB data streams... // TODO: QHexEdit doesn't show vertical scroll bars for > 10MB data streams...

View File

@ -75,8 +75,7 @@ void RegistersWidget::OnDebugModeEntered() {
UpdateVFPSystemRegisterValues(); UpdateVFPSystemRegisterValues();
} }
void RegistersWidget::OnDebugModeLeft() { void RegistersWidget::OnDebugModeLeft() {}
}
void RegistersWidget::OnEmulationStarting(EmuThread* emu_thread) { void RegistersWidget::OnEmulationStarting(EmuThread* emu_thread) {
setEnabled(true); setEnabled(true);

View File

@ -59,12 +59,9 @@ static QString GetQStringShortTitleFromSMDH(const Loader::SMDH& smdh,
class GameListItem : public QStandardItem { class GameListItem : public QStandardItem {
public: public:
GameListItem() : QStandardItem() { GameListItem() : QStandardItem() {}
} GameListItem(const QString& string) : QStandardItem(string) {}
GameListItem(const QString& string) : QStandardItem(string) { virtual ~GameListItem() override {}
}
virtual ~GameListItem() override {
}
}; };
/** /**
@ -79,8 +76,7 @@ public:
static const int FullPathRole = Qt::UserRole + 1; static const int FullPathRole = Qt::UserRole + 1;
static const int TitleRole = Qt::UserRole + 2; static const int TitleRole = Qt::UserRole + 2;
GameListItemPath() : GameListItem() { GameListItemPath() : GameListItem() {}
}
GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data) : GameListItem() { GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data) : GameListItem() {
setData(game_path, FullPathRole); setData(game_path, FullPathRole);
@ -124,8 +120,7 @@ class GameListItemSize : public GameListItem {
public: public:
static const int SizeRole = Qt::UserRole + 1; static const int SizeRole = Qt::UserRole + 1;
GameListItemSize() : GameListItem() { GameListItemSize() : GameListItem() {}
}
GameListItemSize(const qulonglong size_bytes) : GameListItem() { GameListItemSize(const qulonglong size_bytes) : GameListItem() {
setData(size_bytes, SizeRole); setData(size_bytes, SizeRole);
} }
@ -161,8 +156,7 @@ class GameListWorker : public QObject, public QRunnable {
public: public:
GameListWorker(QString dir_path, bool deep_scan) GameListWorker(QString dir_path, bool deep_scan)
: QObject(), QRunnable(), dir_path(dir_path), deep_scan(deep_scan) { : QObject(), QRunnable(), dir_path(dir_path), deep_scan(deep_scan) {}
}
public slots: public slots:
/// Starts the processing of directory tree information. /// Starts the processing of directory tree information.

View File

@ -12,8 +12,7 @@
#include "citra_qt/ui_settings.h" #include "citra_qt/ui_settings.h"
struct Hotkey { struct Hotkey {
Hotkey() : shortcut(nullptr), context(Qt::WindowShortcut) { Hotkey() : shortcut(nullptr), context(Qt::WindowShortcut) {}
}
QKeySequence keyseq; QKeySequence keyseq;
QShortcut* shortcut; QShortcut* shortcut;

View File

@ -26,8 +26,8 @@ class GPUCommandListWidget;
class GMainWindow : public QMainWindow { class GMainWindow : public QMainWindow {
Q_OBJECT Q_OBJECT
static const int max_recent_files_item = /// Max number of recently loaded items to keep track of
10; ///< Max number of recently loaded items to keep track static const int max_recent_files_item = 10;
// TODO: Make use of this! // TODO: Make use of this!
enum { enum {

View File

@ -102,10 +102,8 @@ public:
// A reference to a particular bit, returned from operator[]. // A reference to a particular bit, returned from operator[].
class Ref { class Ref {
public: public:
Ref(Ref&& other) : m_bs(other.m_bs), m_mask(other.m_mask) { Ref(Ref&& other) : m_bs(other.m_bs), m_mask(other.m_mask) {}
} Ref(BitSet* bs, IntTy mask) : m_bs(bs), m_mask(mask) {}
Ref(BitSet* bs, IntTy mask) : m_bs(bs), m_mask(mask) {
}
operator bool() const { operator bool() const {
return (m_bs->m_val & m_mask) != 0; return (m_bs->m_val & m_mask) != 0;
} }
@ -122,10 +120,8 @@ public:
// A STL-like iterator is required to be able to use range-based for loops. // A STL-like iterator is required to be able to use range-based for loops.
class Iterator { class Iterator {
public: public:
Iterator(const Iterator& other) : m_val(other.m_val), m_bit(other.m_bit) { Iterator(const Iterator& other) : m_val(other.m_val), m_bit(other.m_bit) {}
} Iterator(IntTy val, int bit) : m_val(val), m_bit(bit) {}
Iterator(IntTy val, int bit) : m_val(val), m_bit(bit) {
}
Iterator& operator=(Iterator other) { Iterator& operator=(Iterator other) {
new (this) Iterator(other); new (this) Iterator(other);
return *this; return *this;
@ -160,10 +156,8 @@ public:
int m_bit; int m_bit;
}; };
BitSet() : m_val(0) { BitSet() : m_val(0) {}
} explicit BitSet(IntTy val) : m_val(val) {}
explicit BitSet(IntTy val) : m_val(val) {
}
BitSet(std::initializer_list<int> init) { BitSet(std::initializer_list<int> init) {
m_val = 0; m_val = 0;
for (int bit : init) for (int bit : init)

View File

@ -50,8 +50,7 @@ class PointerWrap;
class PointerWrapSection { class PointerWrapSection {
public: public:
PointerWrapSection(PointerWrap& p, int ver, const char* title) PointerWrapSection(PointerWrap& p, int ver, const char* title)
: p_(p), ver_(ver), title_(title) { : p_(p), ver_(ver), title_(title) {}
}
~PointerWrapSection(); ~PointerWrapSection();
bool operator==(const int& v) const { bool operator==(const int& v) const {
@ -134,11 +133,9 @@ public:
Error error; Error error;
public: public:
PointerWrap(u8** ptr_, Mode mode_) : ptr(ptr_), mode(mode_), error(ERROR_NONE) { PointerWrap(u8** ptr_, Mode mode_) : ptr(ptr_), mode(mode_), error(ERROR_NONE) {}
}
PointerWrap(unsigned char** ptr_, int mode_) PointerWrap(unsigned char** ptr_, int mode_)
: ptr((u8**)ptr_), mode((Mode)mode_), error(ERROR_NONE) { : ptr((u8**)ptr_), mode((Mode)mode_), error(ERROR_NONE) {}
}
PointerWrapSection Section(const char* title, int ver) { PointerWrapSection Section(const char* title, int ver) {
return Section(title, ver, ver); return Section(title, ver, ver);

View File

@ -27,8 +27,7 @@ protected:
size_t region_size; size_t region_size;
public: public:
CodeBlock() : region(nullptr), region_size(0) { CodeBlock() : region(nullptr), region_size(0) {}
}
virtual ~CodeBlock() { virtual ~CodeBlock() {
if (region) if (region)
FreeCodeSpace(); FreeCodeSpace();

View File

@ -86,8 +86,7 @@ inline u64 _rotr64(u64 x, unsigned int shift) {
extern "C" { extern "C" {
__declspec(dllimport) void __stdcall DebugBreak(void); __declspec(dllimport) void __stdcall DebugBreak(void);
} }
#define Crash() \ #define Crash() DebugBreak()
{ DebugBreak(); }
// cstdlib provides these on MSVC // cstdlib provides these on MSVC
#define rotr _rotr #define rotr _rotr

View File

@ -229,8 +229,7 @@ protected:
circle_pad_y = 0; circle_pad_y = 0;
touch_pressed = false; touch_pressed = false;
} }
virtual ~EmuWindow() { virtual ~EmuWindow() {}
}
/** /**
* Processes any pending configuration changes from the last SetConfig call. * Processes any pending configuration changes from the last SetConfig call.
@ -272,8 +271,8 @@ private:
* For the request to be honored, EmuWindow implementations will usually reimplement this * For the request to be honored, EmuWindow implementations will usually reimplement this
* function. * function.
*/ */
virtual void virtual void OnMinimalClientAreaChangeRequest(
OnMinimalClientAreaChangeRequest(const std::pair<unsigned, unsigned>& minimal_size) { const std::pair<unsigned, unsigned>& minimal_size) {
// By default, ignore this request and do nothing. // By default, ignore this request and do nothing.
} }

View File

@ -828,8 +828,7 @@ void SplitFilename83(const std::string& filename, std::array<char, 9>& short_nam
} }
} }
IOFile::IOFile() { IOFile::IOFile() {}
}
IOFile::IOFile(const std::string& filename, const char openmode[]) { IOFile::IOFile(const std::string& filename, const char openmode[]) {
Open(filename, openmode); Open(filename, openmode);

View File

@ -27,12 +27,10 @@ struct Rectangle {
T right; T right;
T bottom; T bottom;
Rectangle() { Rectangle() {}
}
Rectangle(T left, T top, T right, T bottom) Rectangle(T left, T top, T right, T bottom)
: left(left), top(top), right(right), bottom(bottom) { : left(left), top(top), right(right), bottom(bottom) {}
}
T GetWidth() const { T GetWidth() const {
return std::abs(static_cast<typename std::make_signed<T>::type>(right - left)); return std::abs(static_cast<typename std::make_signed<T>::type>(right - left));

View File

@ -14,8 +14,7 @@ namespace Common {
namespace Profiling { namespace Profiling {
ProfilingManager::ProfilingManager() ProfilingManager::ProfilingManager()
: last_frame_end(Clock::now()), this_frame_start(Clock::now()) { : last_frame_end(Clock::now()), this_frame_start(Clock::now()) {}
}
void ProfilingManager::BeginFrame() { void ProfilingManager::BeginFrame() {
this_frame_start = Clock::now(); this_frame_start = Clock::now();

View File

@ -10,8 +10,7 @@
namespace detail { namespace detail {
template <typename Func> template <typename Func>
struct ScopeExitHelper { struct ScopeExitHelper {
explicit ScopeExitHelper(Func&& func) : func(std::move(func)) { explicit ScopeExitHelper(Func&& func) : func(std::move(func)) {}
}
~ScopeExitHelper() { ~ScopeExitHelper() {
func(); func();
} }

View File

@ -168,8 +168,7 @@ public:
return swap(value); return swap(value);
} }
swap_struct_t() = default; swap_struct_t() = default;
swap_struct_t(const T& v) : value(swap(v)) { swap_struct_t(const T& v) : value(swap(v)) {}
}
template <typename S> template <typename S>
swapped_t& operator=(const S& source) { swapped_t& operator=(const S& source) {

View File

@ -19,8 +19,7 @@ template <typename T>
class SynchronizedWrapper { class SynchronizedWrapper {
public: public:
template <typename... Args> template <typename... Args>
SynchronizedWrapper(Args&&... args) : data(std::forward<Args>(args)...) { SynchronizedWrapper(Args&&... args) : data(std::forward<Args>(args)...) {}
}
private: private:
template <typename U> template <typename U>

View File

@ -39,8 +39,7 @@ void SetCurrentThreadAffinity(u32 mask);
class Event { class Event {
public: public:
Event() : is_set(false) { Event() : is_set(false) {}
}
void Set() { void Set() {
std::lock_guard<std::mutex> lk(mutex); std::lock_guard<std::mutex> lk(mutex);
@ -71,8 +70,7 @@ private:
class Barrier { class Barrier {
public: public:
explicit Barrier(size_t count_) : count(count_), waiting(0), generation(0) { explicit Barrier(size_t count_) : count(count_), waiting(0), generation(0) {}
}
/// Blocks until all "count" threads have called Sync() /// Blocks until all "count" threads have called Sync()
void Sync() { void Sync() {

View File

@ -60,10 +60,8 @@ public:
} }
Vec2() = default; Vec2() = default;
Vec2(const T a[2]) : x(a[0]), y(a[1]) { Vec2(const T a[2]) : x(a[0]), y(a[1]) {}
} Vec2(const T& _x, const T& _y) : x(_x), y(_y) {}
Vec2(const T& _x, const T& _y) : x(_x), y(_y) {
}
template <typename T2> template <typename T2>
Vec2<T2> Cast() const { Vec2<T2> Cast() const {
@ -201,10 +199,8 @@ public:
} }
Vec3() = default; Vec3() = default;
Vec3(const T a[3]) : x(a[0]), y(a[1]), z(a[2]) { Vec3(const T a[3]) : x(a[0]), y(a[1]), z(a[2]) {}
} Vec3(const T& _x, const T& _y, const T& _z) : x(_x), y(_y), z(_z) {}
Vec3(const T& _x, const T& _y, const T& _z) : x(_x), y(_y), z(_z) {
}
template <typename T2> template <typename T2>
Vec3<T2> Cast() const { Vec3<T2> Cast() const {
@ -409,10 +405,8 @@ public:
} }
Vec4() = default; Vec4() = default;
Vec4(const T a[4]) : x(a[0]), y(a[1]), z(a[2]), w(a[3]) { Vec4(const T a[4]) : x(a[0]), y(a[1]), z(a[2]), w(a[3]) {}
} Vec4(const T& _x, const T& _y, const T& _z, const T& _w) : x(_x), y(_y), z(_z), w(_w) {}
Vec4(const T& _x, const T& _y, const T& _z, const T& _w) : x(_x), y(_y), z(_z), w(_w) {
}
template <typename T2> template <typename T2>
Vec4<T2> Cast() const { Vec4<T2> Cast() const {

View File

@ -222,7 +222,7 @@ void OpArg::WriteVex(XEmitter* emit, X64Reg regOp1, X64Reg regOp2, int L, int pp
void OpArg::WriteRest(XEmitter* emit, int extraBytes, X64Reg _operandReg, void OpArg::WriteRest(XEmitter* emit, int extraBytes, X64Reg _operandReg,
bool warn_64bit_offset) const { bool warn_64bit_offset) const {
if (_operandReg == INVALID_REG) if (_operandReg == INVALID_REG)
_operandReg = (X64Reg) this->operandReg; _operandReg = (X64Reg)this->operandReg;
int mod = 0; int mod = 0;
int ireg = indexReg; int ireg = indexReg;
bool SIB = false; bool SIB = false;

View File

@ -233,8 +233,7 @@ struct OpArg {
constexpr OpArg() = default; // dummy op arg, used for storage constexpr OpArg() = default; // dummy op arg, used for storage
constexpr OpArg(u64 offset_, int scale_, X64Reg rmReg = RAX, X64Reg scaledReg = RAX) constexpr OpArg(u64 offset_, int scale_, X64Reg rmReg = RAX, X64Reg scaledReg = RAX)
: scale(static_cast<u8>(scale_)), offsetOrBaseReg(static_cast<u16>(rmReg)), : scale(static_cast<u8>(scale_)), offsetOrBaseReg(static_cast<u16>(rmReg)),
indexReg(static_cast<u16>(scaledReg)), offset(offset_) { indexReg(static_cast<u16>(scaledReg)), offset(offset_) {}
}
constexpr bool operator==(const OpArg& b) const { constexpr bool operator==(const OpArg& b) const {
return operandReg == b.operandReg && scale == b.scale && return operandReg == b.operandReg && scale == b.scale &&
@ -454,8 +453,7 @@ public:
code = code_ptr; code = code_ptr;
flags_locked = false; flags_locked = false;
} }
virtual ~XEmitter() { virtual ~XEmitter() {}
}
void WriteModRM(int mod, int rm, int reg); void WriteModRM(int mod, int rm, int reg);
void WriteSIB(int scale, int index, int base); void WriteSIB(int scale, int index, int base);

View File

@ -15,8 +15,7 @@ struct ThreadContext;
/// Generic ARM11 CPU interface /// Generic ARM11 CPU interface
class ARM_Interface : NonCopyable { class ARM_Interface : NonCopyable {
public: public:
virtual ~ARM_Interface() { virtual ~ARM_Interface() {}
}
/** /**
* Runs the CPU for the given number of instructions * Runs the CPU for the given number of instructions

View File

@ -21,8 +21,7 @@ ARM_DynCom::ARM_DynCom(PrivilegeMode initial_mode) {
state = std::make_unique<ARMul_State>(initial_mode); state = std::make_unique<ARMul_State>(initial_mode);
} }
ARM_DynCom::~ARM_DynCom() { ARM_DynCom::~ARM_DynCom() {}
}
void ARM_DynCom::ClearInstructionCache() { void ARM_DynCom::ClearInstructionCache() {
state->instruction_cache.clear(); state->instruction_cache.clear();

View File

@ -1883,6 +1883,7 @@ const transop_fp_t arm_instruction_trans[] = {
// All the thumb instructions should be placed the end of table // All the thumb instructions should be placed the end of table
INTERPRETER_TRANSLATE(b_2_thumb), INTERPRETER_TRANSLATE(b_cond_thumb), INTERPRETER_TRANSLATE(b_2_thumb), INTERPRETER_TRANSLATE(b_cond_thumb),
INTERPRETER_TRANSLATE(bl_1_thumb), INTERPRETER_TRANSLATE(bl_2_thumb), INTERPRETER_TRANSLATE(bl_1_thumb), INTERPRETER_TRANSLATE(bl_2_thumb),
INTERPRETER_TRANSLATE(blx_1_thumb)}; INTERPRETER_TRANSLATE(blx_1_thumb),
};
const size_t arm_instruction_trans_len = sizeof(arm_instruction_trans) / sizeof(transop_fp_t); const size_t arm_instruction_trans_len = sizeof(arm_instruction_trans) / sizeof(transop_fp_t);

View File

@ -237,10 +237,8 @@ private:
void ResetMPCoreCP15Registers(); void ResetMPCoreCP15Registers();
// Defines a reservation granule of 2 words, which protects the first 2 words starting at the // Defines a reservation granule of 2 words, which protects the first 2 words starting at the
// tag. // tag. This is the smallest granule allowed by the v7 spec, and is coincidentally just large
// This is the smallest granule allowed by the v7 spec, and is coincidentally just large enough // enough to support LDR/STREXD.
// to
// support LDR/STREXD.
static const u32 RESERVATION_GRANULE_MASK = 0xFFFFFFF8; static const u32 RESERVATION_GRANULE_MASK = 0xFFFFFFF8;
u32 exclusive_tag; // The address for which the local monitor is in exclusive access mode u32 exclusive_tag; // The address for which the local monitor is in exclusive access mode

View File

@ -51,10 +51,10 @@
* =========================================================================== * ===========================================================================
*/ */
#include "core/arm/skyeye_common/vfp/vfp.h"
#include <algorithm> #include <algorithm>
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/arm/skyeye_common/vfp/asm_vfp.h" #include "core/arm/skyeye_common/vfp/asm_vfp.h"
#include "core/arm/skyeye_common/vfp/vfp.h"
#include "core/arm/skyeye_common/vfp/vfp_helper.h" #include "core/arm/skyeye_common/vfp/vfp_helper.h"
static struct vfp_double vfp_double_default_qnan = { static struct vfp_double vfp_double_default_qnan = {

View File

@ -280,13 +280,15 @@ static u32 vfp_single_fneg(ARMul_State* state, int sd, int unused, s32 m, u32 fp
return 0; return 0;
} }
static const u16 sqrt_oddadjust[] = {0x0004, 0x0022, 0x005d, 0x00b1, 0x011d, 0x019f, static const u16 sqrt_oddadjust[] = {
0x0236, 0x02e0, 0x039c, 0x0468, 0x0545, 0x0631, 0x0004, 0x0022, 0x005d, 0x00b1, 0x011d, 0x019f, 0x0236, 0x02e0,
0x072b, 0x0832, 0x0946, 0x0a67}; 0x039c, 0x0468, 0x0545, 0x0631, 0x072b, 0x0832, 0x0946, 0x0a67,
};
static const u16 sqrt_evenadjust[] = {0x0a2d, 0x08af, 0x075a, 0x0629, 0x051a, 0x0429, static const u16 sqrt_evenadjust[] = {
0x0356, 0x029e, 0x0200, 0x0179, 0x0109, 0x00af, 0x0a2d, 0x08af, 0x075a, 0x0629, 0x051a, 0x0429, 0x0356, 0x029e,
0x0068, 0x0034, 0x0012, 0x0002}; 0x0200, 0x0179, 0x0109, 0x00af, 0x0068, 0x0034, 0x0012, 0x0002,
};
u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand) { u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand) {
int index; int index;

View File

@ -28,8 +28,7 @@ void RunLoop(int tight_loop) {
GDBStub::HandlePacket(); GDBStub::HandlePacket();
// If the loop is halted and we want to step, use a tiny (1) number of instructions to // If the loop is halted and we want to step, use a tiny (1) number of instructions to
// execute. // execute. Otherwise, get out of the loop function.
// Otherwise get out of the loop function.
if (GDBStub::GetCpuHaltFlag()) { if (GDBStub::GetCpuHaltFlag()) {
if (GDBStub::GetCpuStepFlag()) { if (GDBStub::GetCpuStepFlag()) {
GDBStub::SetCpuStepFlag(false); GDBStub::SetCpuStepFlag(false);

View File

@ -23,11 +23,9 @@ int g_clock_rate_arm11 = 268123480;
namespace CoreTiming { namespace CoreTiming {
struct EventType { struct EventType {
EventType() { EventType() {}
}
EventType(TimedCallback cb, const char* n) : callback(cb), name(n) { EventType(TimedCallback cb, const char* n) : callback(cb), name(n) {}
}
TimedCallback callback; TimedCallback callback;
const char* name; const char* name;

View File

@ -21,7 +21,13 @@ class FileBackend;
class DirectoryBackend; class DirectoryBackend;
// Path string type // Path string type
enum LowPathType : u32 { Invalid = 0, Empty = 1, Binary = 2, Char = 3, Wchar = 4 }; enum LowPathType : u32 {
Invalid = 0,
Empty = 1,
Binary = 2,
Char = 3,
Wchar = 4,
};
union Mode { union Mode {
u32 hex; u32 hex;
@ -32,12 +38,9 @@ union Mode {
class Path { class Path {
public: public:
Path() : type(Invalid) { Path() : type(Invalid) {}
} Path(const char* path) : type(Char), string(path) {}
Path(const char* path) : type(Char), string(path) { Path(std::vector<u8> binary_data) : type(Binary), binary(std::move(binary_data)) {}
}
Path(std::vector<u8> binary_data) : type(Binary), binary(std::move(binary_data)) {
}
Path(LowPathType type, u32 size, u32 pointer); Path(LowPathType type, u32 size, u32 pointer);
LowPathType GetType() const { LowPathType GetType() const {
@ -61,22 +64,18 @@ private:
std::u16string u16str; std::u16string u16str;
}; };
/// Parameters of the archive, as specified in the Create or Format call.
struct ArchiveFormatInfo { struct ArchiveFormatInfo {
u32_le total_size; ///< The pre-defined size of the archive, as specified in the Create or u32_le total_size; ///< The pre-defined size of the archive.
/// Format call u32_le number_directories; ///< The pre-defined number of directories in the archive.
u32_le number_directories; ///< The pre-defined number of directories in the archive, as u32_le number_files; ///< The pre-defined number of files in the archive.
/// specified in the Create or Format call u8 duplicate_data; ///< Whether the archive should duplicate the data.
u32_le number_files; ///< The pre-defined number of files in the archive, as specified in the
/// Create or Format call
u8 duplicate_data; ///< Whether the archive should duplicate the data, as specified in the
/// Create or Format call
}; };
static_assert(std::is_pod<ArchiveFormatInfo>::value, "ArchiveFormatInfo is not POD"); static_assert(std::is_pod<ArchiveFormatInfo>::value, "ArchiveFormatInfo is not POD");
class ArchiveBackend : NonCopyable { class ArchiveBackend : NonCopyable {
public: public:
virtual ~ArchiveBackend() { virtual ~ArchiveBackend() {}
}
/** /**
* Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.) * Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.)
@ -153,8 +152,7 @@ public:
class ArchiveFactory : NonCopyable { class ArchiveFactory : NonCopyable {
public: public:
virtual ~ArchiveFactory() { virtual ~ArchiveFactory() {}
}
/** /**
* Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.) * Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.)

View File

@ -48,11 +48,10 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SaveData::Open(const P
std::string concrete_mount_point = std::string concrete_mount_point =
GetSaveDataPath(mount_point, Kernel::g_current_process->codeset->program_id); GetSaveDataPath(mount_point, Kernel::g_current_process->codeset->program_id);
if (!FileUtil::Exists(concrete_mount_point)) { if (!FileUtil::Exists(concrete_mount_point)) {
// When a SaveData archive is created for the first time, it is not yet formatted // When a SaveData archive is created for the first time, it is not yet formatted and the
// and the save file/directory structure expected by the game has not yet been initialized. // save file/directory structure expected by the game has not yet been initialized.
// Returning the NotFormatted error code will signal the game to provision the SaveData // Returning the NotFormatted error code will signal the game to provision the SaveData
// archive // archive with the files and folders that it expects.
// with the files and folders that it expects.
return ResultCode(ErrorDescription::FS_NotFormatted, ErrorModule::FS, return ResultCode(ErrorDescription::FS_NotFormatted, ErrorModule::FS,
ErrorSummary::InvalidState, ErrorLevel::Status); ErrorSummary::InvalidState, ErrorLevel::Status);
} }

View File

@ -30,8 +30,7 @@ static std::string GetSaveDataCheckPath(const std::string& mount_point, u32 high
} }
ArchiveFactory_SaveDataCheck::ArchiveFactory_SaveDataCheck(const std::string& nand_directory) ArchiveFactory_SaveDataCheck::ArchiveFactory_SaveDataCheck(const std::string& nand_directory)
: mount_point(GetSaveDataCheckContainerPath(nand_directory)) { : mount_point(GetSaveDataCheckContainerPath(nand_directory)) {}
}
ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SaveDataCheck::Open(const Path& path) { ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SaveDataCheck::Open(const Path& path) {
auto vec = path.AsBinary(); auto vec = path.AsBinary();

View File

@ -49,8 +49,7 @@ Path ConstructSystemSaveDataBinaryPath(u32 high, u32 low) {
} }
ArchiveFactory_SystemSaveData::ArchiveFactory_SystemSaveData(const std::string& nand_path) ArchiveFactory_SystemSaveData::ArchiveFactory_SystemSaveData(const std::string& nand_path)
: base_path(GetSystemSaveDataContainerPath(nand_path)) { : base_path(GetSystemSaveDataContainerPath(nand_path)) {}
}
ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SystemSaveData::Open(const Path& path) { ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SystemSaveData::Open(const Path& path) {
std::string fullpath = GetSystemSaveDataPath(base_path, path); std::string fullpath = GetSystemSaveDataPath(base_path, path);

View File

@ -38,10 +38,8 @@ static_assert(offsetof(Entry, file_size) == 0x220, "Wrong offset for file_size i
class DirectoryBackend : NonCopyable { class DirectoryBackend : NonCopyable {
public: public:
DirectoryBackend() { DirectoryBackend() {}
} virtual ~DirectoryBackend() {}
virtual ~DirectoryBackend() {
}
/** /**
* Open the directory * Open the directory

View File

@ -29,8 +29,7 @@ namespace FileSys {
*/ */
class DiskArchive : public ArchiveBackend { class DiskArchive : public ArchiveBackend {
public: public:
DiskArchive(const std::string& mount_point_) : mount_point(mount_point_) { DiskArchive(const std::string& mount_point_) : mount_point(mount_point_) {}
}
virtual std::string GetName() const override { virtual std::string GetName() const override {
return "DiskArchive: " + mount_point; return "DiskArchive: " + mount_point;

View File

@ -16,10 +16,8 @@ namespace FileSys {
class FileBackend : NonCopyable { class FileBackend : NonCopyable {
public: public:
FileBackend() { FileBackend() {}
} virtual ~FileBackend() {}
virtual ~FileBackend() {
}
/** /**
* Open the file * Open the file

View File

@ -30,8 +30,7 @@ namespace FileSys {
class IVFCArchive : public ArchiveBackend { class IVFCArchive : public ArchiveBackend {
public: public:
IVFCArchive(std::shared_ptr<FileUtil::IOFile> file, u64 offset, u64 size) IVFCArchive(std::shared_ptr<FileUtil::IOFile> file, u64 offset, u64 size)
: romfs_file(file), data_offset(offset), data_size(size) { : romfs_file(file), data_offset(offset), data_size(size) {}
}
std::string GetName() const override; std::string GetName() const override;
@ -55,8 +54,7 @@ protected:
class IVFCFile : public FileBackend { class IVFCFile : public FileBackend {
public: public:
IVFCFile(std::shared_ptr<FileUtil::IOFile> file, u64 offset, u64 size) IVFCFile(std::shared_ptr<FileUtil::IOFile> file, u64 offset, u64 size)
: romfs_file(file), data_offset(offset), data_size(size) { : romfs_file(file), data_offset(offset), data_size(size) {}
}
ResultCode Open() override { ResultCode Open() override {
return RESULT_SUCCESS; return RESULT_SUCCESS;
@ -68,8 +66,7 @@ public:
bool Close() const override { bool Close() const override {
return false; return false;
} }
void Flush() const override { void Flush() const override {}
}
private: private:
std::shared_ptr<FileUtil::IOFile> romfs_file; std::shared_ptr<FileUtil::IOFile> romfs_file;

View File

@ -14,10 +14,8 @@ namespace Applets {
class Applet { class Applet {
public: public:
virtual ~Applet() { virtual ~Applet() {}
} Applet(Service::APT::AppletId id) : id(id) {}
Applet(Service::APT::AppletId id) : id(id) {
}
/** /**
* Creates an instance of the Applet subclass identified by the parameter. * Creates an instance of the Applet subclass identified by the parameter.

View File

@ -67,8 +67,7 @@ ResultCode ErrEula::StartImpl(const Service::APT::AppletStartupParameter& parame
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
void ErrEula::Update() { void ErrEula::Update() {}
}
} // namespace Applets } // namespace Applets
} // namespace HLE } // namespace HLE

View File

@ -12,8 +12,7 @@ namespace Applets {
class ErrEula final : public Applet { class ErrEula final : public Applet {
public: public:
explicit ErrEula(Service::APT::AppletId id) : Applet(id) { explicit ErrEula(Service::APT::AppletId id) : Applet(id) {}
}
ResultCode ReceiveParameter(const Service::APT::MessageParameter& parameter) override; ResultCode ReceiveParameter(const Service::APT::MessageParameter& parameter) override;
ResultCode StartImpl(const Service::APT::AppletStartupParameter& parameter) override; ResultCode StartImpl(const Service::APT::AppletStartupParameter& parameter) override;

View File

@ -85,7 +85,6 @@ ResultCode MiiSelector::StartImpl(const Service::APT::AppletStartupParameter& pa
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
void MiiSelector::Update() { void MiiSelector::Update() {}
}
} }
} // namespace } // namespace

View File

@ -66,8 +66,7 @@ ASSERT_REG_POSITION(unk_6C, 0x6C);
class MiiSelector final : public Applet { class MiiSelector final : public Applet {
public: public:
MiiSelector(Service::APT::AppletId id) : Applet(id), started(false) { MiiSelector(Service::APT::AppletId id) : Applet(id), started(false) {}
}
ResultCode ReceiveParameter(const Service::APT::MessageParameter& parameter) override; ResultCode ReceiveParameter(const Service::APT::MessageParameter& parameter) override;
ResultCode StartImpl(const Service::APT::AppletStartupParameter& parameter) override; ResultCode StartImpl(const Service::APT::AppletStartupParameter& parameter) override;

View File

@ -53,8 +53,7 @@ static_assert(sizeof(SoftwareKeyboardConfig) == 0x400, "Software Keyboard Config
class SoftwareKeyboard final : public Applet { class SoftwareKeyboard final : public Applet {
public: public:
SoftwareKeyboard(Service::APT::AppletId id) : Applet(id), started(false) { SoftwareKeyboard(Service::APT::AppletId id) : Applet(id), started(false) {}
}
ResultCode ReceiveParameter(const Service::APT::MessageParameter& parameter) override; ResultCode ReceiveParameter(const Service::APT::MessageParameter& parameter) override;
ResultCode StartImpl(const Service::APT::AppletStartupParameter& parameter) override; ResultCode StartImpl(const Service::APT::AppletStartupParameter& parameter) override;

View File

@ -16,10 +16,8 @@
namespace Kernel { namespace Kernel {
AddressArbiter::AddressArbiter() { AddressArbiter::AddressArbiter() {}
} AddressArbiter::~AddressArbiter() {}
AddressArbiter::~AddressArbiter() {
}
SharedPtr<AddressArbiter> AddressArbiter::Create(std::string name) { SharedPtr<AddressArbiter> AddressArbiter::Create(std::string name) {
SharedPtr<AddressArbiter> address_arbiter(new AddressArbiter); SharedPtr<AddressArbiter> address_arbiter(new AddressArbiter);

View File

@ -10,9 +10,7 @@
namespace Kernel { namespace Kernel {
ClientPort::ClientPort() { ClientPort::ClientPort() {}
} ClientPort::~ClientPort() {}
ClientPort::~ClientPort() {
}
} // namespace } // namespace

View File

@ -14,10 +14,8 @@
namespace Kernel { namespace Kernel {
Event::Event() { Event::Event() {}
} Event::~Event() {}
Event::~Event() {
}
SharedPtr<Event> Event::Create(ResetType reset_type, std::string name) { SharedPtr<Event> Event::Create(ResetType reset_type, std::string name) {
SharedPtr<Event> evt(new Event); SharedPtr<Event> evt(new Event);

View File

@ -58,8 +58,7 @@ enum {
class Object : NonCopyable { class Object : NonCopyable {
public: public:
virtual ~Object() { virtual ~Object() {}
}
/// Returns a unique identifier for the object. For debugging purposes only. /// Returns a unique identifier for the object. For debugging purposes only.
unsigned int GetObjectId() const { unsigned int GetObjectId() const {

View File

@ -33,10 +33,8 @@ void ReleaseThreadMutexes(Thread* thread) {
thread->held_mutexes.clear(); thread->held_mutexes.clear();
} }
Mutex::Mutex() { Mutex::Mutex() {}
} Mutex::~Mutex() {}
Mutex::~Mutex() {
}
SharedPtr<Mutex> Mutex::Create(bool initial_locked, std::string name) { SharedPtr<Mutex> Mutex::Create(bool initial_locked, std::string name) {
SharedPtr<Mutex> mutex(new Mutex); SharedPtr<Mutex> mutex(new Mutex);

View File

@ -26,10 +26,8 @@ SharedPtr<CodeSet> CodeSet::Create(std::string name, u64 program_id) {
return codeset; return codeset;
} }
CodeSet::CodeSet() { CodeSet::CodeSet() {}
} CodeSet::~CodeSet() {}
CodeSet::~CodeSet() {
}
u32 Process::next_process_id; u32 Process::next_process_id;
@ -282,10 +280,8 @@ ResultCode Process::LinearFree(VAddr target, u32 size) {
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
Kernel::Process::Process() { Kernel::Process::Process() {}
} Kernel::Process::~Process() {}
Kernel::Process::~Process() {
}
SharedPtr<Process> g_current_process; SharedPtr<Process> g_current_process;
} }

View File

@ -12,10 +12,8 @@ namespace Kernel {
static SharedPtr<ResourceLimit> resource_limits[4]; static SharedPtr<ResourceLimit> resource_limits[4];
ResourceLimit::ResourceLimit() { ResourceLimit::ResourceLimit() {}
} ResourceLimit::~ResourceLimit() {}
ResourceLimit::~ResourceLimit() {
}
SharedPtr<ResourceLimit> ResourceLimit::Create(std::string name) { SharedPtr<ResourceLimit> ResourceLimit::Create(std::string name) {
SharedPtr<ResourceLimit> resource_limit(new ResourceLimit); SharedPtr<ResourceLimit> resource_limit(new ResourceLimit);
@ -150,7 +148,6 @@ void ResourceLimitsInit() {
resource_limits[static_cast<u8>(ResourceLimitCategory::OTHER)] = resource_limit; resource_limits[static_cast<u8>(ResourceLimitCategory::OTHER)] = resource_limit;
} }
void ResourceLimitsShutdown() { void ResourceLimitsShutdown() {}
}
} // namespace } // namespace

View File

@ -92,8 +92,8 @@ public:
s32 max_cpu_time = 0; s32 max_cpu_time = 0;
// TODO(Subv): Increment these in their respective Kernel::T::Create functions, keeping in mind // TODO(Subv): Increment these in their respective Kernel::T::Create functions, keeping in mind
// that // that APPLICATION resource limits should not be affected by the objects created by service
// APPLICATION resource limits should not be affected by the objects created by service modules. // modules.
// Currently we have no way of distinguishing if a Create was called by the running application, // Currently we have no way of distinguishing if a Create was called by the running application,
// or by a service module. Approach this once we have separated the service modules into their // or by a service module. Approach this once we have separated the service modules into their
// own processes // own processes

View File

@ -10,10 +10,8 @@
namespace Kernel { namespace Kernel {
Semaphore::Semaphore() { Semaphore::Semaphore() {}
} Semaphore::~Semaphore() {}
Semaphore::~Semaphore() {
}
ResultVal<SharedPtr<Semaphore>> Semaphore::Create(s32 initial_count, s32 max_count, ResultVal<SharedPtr<Semaphore>> Semaphore::Create(s32 initial_count, s32 max_count,
std::string name) { std::string name) {

View File

@ -13,10 +13,8 @@
namespace Kernel { namespace Kernel {
ServerPort::ServerPort() { ServerPort::ServerPort() {}
} ServerPort::~ServerPort() {}
ServerPort::~ServerPort() {
}
bool ServerPort::ShouldWait() { bool ServerPort::ShouldWait() {
// If there are no pending sessions, we wait until a new one is added. // If there are no pending sessions, we wait until a new one is added.
@ -27,8 +25,9 @@ void ServerPort::Acquire() {
ASSERT_MSG(!ShouldWait(), "object unavailable!"); ASSERT_MSG(!ShouldWait(), "object unavailable!");
} }
std::tuple<SharedPtr<ServerPort>, SharedPtr<ClientPort>> std::tuple<SharedPtr<ServerPort>, SharedPtr<ClientPort>> ServerPort::CreatePortPair(
ServerPort::CreatePortPair(u32 max_sessions, std::string name) { u32 max_sessions, std::string name) {
SharedPtr<ServerPort> server_port(new ServerPort); SharedPtr<ServerPort> server_port(new ServerPort);
SharedPtr<ClientPort> client_port(new ClientPort); SharedPtr<ClientPort> client_port(new ClientPort);

View File

@ -23,8 +23,8 @@ public:
* @param name Optional name of the ports * @param name Optional name of the ports
* @return The created port tuple * @return The created port tuple
*/ */
static std::tuple<SharedPtr<ServerPort>, SharedPtr<ClientPort>> static std::tuple<SharedPtr<ServerPort>, SharedPtr<ClientPort>> CreatePortPair(
CreatePortPair(u32 max_sessions, std::string name = "UnknownPort"); u32 max_sessions, std::string name = "UnknownPort");
std::string GetTypeName() const override { std::string GetTypeName() const override {
return "ServerPort"; return "ServerPort";

View File

@ -7,8 +7,6 @@
namespace Kernel { namespace Kernel {
Session::Session() { Session::Session() {}
} Session::~Session() {}
Session::~Session() {
}
} }

View File

@ -12,10 +12,8 @@
namespace Kernel { namespace Kernel {
SharedMemory::SharedMemory() { SharedMemory::SharedMemory() {}
} SharedMemory::~SharedMemory() {}
SharedMemory::~SharedMemory() {
}
SharedPtr<SharedMemory> SharedMemory::Create(SharedPtr<Process> owner_process, u32 size, SharedPtr<SharedMemory> SharedMemory::Create(SharedPtr<Process> owner_process, u32 size,
MemoryPermission permissions, MemoryPermission permissions,

View File

@ -61,10 +61,8 @@ inline static u32 const NewThreadId() {
return next_thread_id++; return next_thread_id++;
} }
Thread::Thread() { Thread::Thread() {}
} Thread::~Thread() {}
Thread::~Thread() {
}
Thread* GetCurrentThread() { Thread* GetCurrentThread() {
return current_thread; return current_thread;

View File

@ -20,10 +20,8 @@ static int timer_callback_event_type;
// us to simply use a pool index or similar. // us to simply use a pool index or similar.
static Kernel::HandleTable timer_callback_handle_table; static Kernel::HandleTable timer_callback_handle_table;
Timer::Timer() { Timer::Timer() {}
} Timer::~Timer() {}
Timer::~Timer() {
}
SharedPtr<Timer> Timer::Create(ResetType reset_type, std::string name) { SharedPtr<Timer> Timer::Create(ResetType reset_type, std::string name) {
SharedPtr<Timer> timer(new Timer); SharedPtr<Timer> timer(new Timer);
@ -103,7 +101,6 @@ void TimersInit() {
timer_callback_event_type = CoreTiming::RegisterEvent("TimerCallback", TimerCallback); timer_callback_event_type = CoreTiming::RegisterEvent("TimerCallback", TimerCallback);
} }
void TimersShutdown() { void TimersShutdown() {}
}
} // namespace } // namespace

View File

@ -213,8 +213,7 @@ union ResultCode {
// error // error
BitField<31, 1, u32> is_error; BitField<31, 1, u32> is_error;
explicit ResultCode(u32 raw) : raw(raw) { explicit ResultCode(u32 raw) : raw(raw) {}
}
ResultCode(ErrorDescription description_, ErrorModule module_, ErrorSummary summary_, ResultCode(ErrorDescription description_, ErrorModule module_, ErrorSummary summary_,
ErrorLevel level_) ErrorLevel level_)
: raw(0) { : raw(0) {

View File

@ -186,8 +186,7 @@ void Init() {
AddService(new AM_U_Interface); AddService(new AM_U_Interface);
} }
void Shutdown() { void Shutdown() {}
}
} // namespace AM } // namespace AM

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/am/am.h"
#include "core/hle/service/am/am_app.h" #include "core/hle/service/am/am_app.h"
#include "core/hle/service/am/am.h"
namespace Service { namespace Service {
namespace AM { namespace AM {

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/am/am.h"
#include "core/hle/service/am/am_net.h" #include "core/hle/service/am/am_net.h"
#include "core/hle/service/am/am.h"
namespace Service { namespace Service {
namespace AM { namespace AM {

View File

@ -2,13 +2,14 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/am/am.h"
#include "core/hle/service/am/am_sys.h" #include "core/hle/service/am/am_sys.h"
#include "core/hle/service/am/am.h"
namespace Service { namespace Service {
namespace AM { namespace AM {
const Interface::FunctionInfo FunctionTable[] = {{0x00010040, GetTitleCount, "GetTitleCount"}, const Interface::FunctionInfo FunctionTable[] = {
{0x00010040, GetTitleCount, "GetTitleCount"},
{0x00020082, GetTitleList, "GetTitleList"}, {0x00020082, GetTitleList, "GetTitleList"},
{0x00030084, GetTitleInfo, "GetTitleInfo"}, {0x00030084, GetTitleInfo, "GetTitleInfo"},
{0x000400C0, nullptr, "DeleteApplicationTitle"}, {0x000400C0, nullptr, "DeleteApplicationTitle"},
@ -28,7 +29,8 @@ const Interface::FunctionInfo FunctionTable[] = {{0x00010040, GetTitleCount, "Ge
{0x001B0144, nullptr, "ExportDSiWare"}, {0x001B0144, nullptr, "ExportDSiWare"},
{0x001C0084, nullptr, "ImportDSiWare"}, {0x001C0084, nullptr, "ImportDSiWare"},
{0x00230080, nullptr, "GetPendingTitleCount"}, {0x00230080, nullptr, "GetPendingTitleCount"},
{0x002400C2, nullptr, "GetPendingTitleList"}}; {0x002400C2, nullptr, "GetPendingTitleList"},
};
AM_SYS_Interface::AM_SYS_Interface() { AM_SYS_Interface::AM_SYS_Interface() {
Register(FunctionTable); Register(FunctionTable);

View File

@ -2,13 +2,14 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/am/am.h"
#include "core/hle/service/am/am_u.h" #include "core/hle/service/am/am_u.h"
#include "core/hle/service/am/am.h"
namespace Service { namespace Service {
namespace AM { namespace AM {
const Interface::FunctionInfo FunctionTable[] = {{0x00010040, GetTitleCount, "GetTitleCount"}, const Interface::FunctionInfo FunctionTable[] = {
{0x00010040, GetTitleCount, "GetTitleCount"},
{0x00020082, GetTitleList, "GetTitleList"}, {0x00020082, GetTitleList, "GetTitleList"},
{0x00030084, GetTitleInfo, "GetTitleInfo"}, {0x00030084, GetTitleInfo, "GetTitleInfo"},
{0x000400C0, nullptr, "DeleteApplicationTitle"}, {0x000400C0, nullptr, "DeleteApplicationTitle"},
@ -41,7 +42,8 @@ const Interface::FunctionInfo FunctionTable[] = {{0x00010040, GetTitleCount, "Ge
{0x040F0000, nullptr, "InstallNATIVEFIRM"}, {0x040F0000, nullptr, "InstallNATIVEFIRM"},
{0x041000C0, nullptr, "DeleteTitle"}, {0x041000C0, nullptr, "DeleteTitle"},
{0x04120000, nullptr, "Initialize"}, {0x04120000, nullptr, "Initialize"},
{0x041700C0, nullptr, "MigrateAGBtoSAV"}}; {0x041700C0, nullptr, "MigrateAGBtoSAV"},
};
AM_U_Interface::AM_U_Interface() { AM_U_Interface::AM_U_Interface() {
Register(FunctionTable); Register(FunctionTable);

View File

@ -90,10 +90,8 @@ void GetSharedFont(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x44, 2, 2); cmd_buff[0] = IPC::MakeHeader(0x44, 2, 2);
cmd_buff[1] = RESULT_SUCCESS.raw; // No error cmd_buff[1] = RESULT_SUCCESS.raw; // No error
// Since the SharedMemory interface doesn't provide the address at which the memory was // Since the SharedMemory interface doesn't provide the address at which the memory was
// allocated, // allocated, the real APT service calculates this address by scanning the entire address space
// the real APT service calculates this address by scanning the entire address space (using // (using svcQueryMemory) and searches for an allocation of the same size as the Shared Font.
// svcQueryMemory)
// and searches for an allocation of the same size as the Shared Font.
cmd_buff[2] = target_address; cmd_buff[2] = target_address;
cmd_buff[3] = IPC::CopyHandleDesc(); cmd_buff[3] = IPC::CopyHandleDesc();
cmd_buff[4] = Kernel::g_handle_table.Create(shared_font_mem).MoveFrom(); cmd_buff[4] = Kernel::g_handle_table.Create(shared_font_mem).MoveFrom();

View File

@ -183,12 +183,10 @@ void GetAppletInfo(Service::Interface* self);
/** /**
* APT::IsRegistered service function. This returns whether the specified AppID is registered with * APT::IsRegistered service function. This returns whether the specified AppID is registered with
* NS yet. * NS yet. An AppID is "registered" once the process associated with the AppID uses APT:Enable. Home
* An AppID is "registered" once the process associated with the AppID uses APT:Enable. Home Menu * Menu uses this command to determine when the launched process is running and to determine when to
* uses this * stop using GSP, etc., while displaying the "Nintendo 3DS" loading screen.
* command to determine when the launched process is running and to determine when to stop using GSP *
* etc,
* while displaying the "Nintendo 3DS" loading screen.
* Inputs: * Inputs:
* 1 : AppID * 1 : AppID
* Outputs: * Outputs:

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/apt/apt.h"
#include "core/hle/service/apt/apt_a.h" #include "core/hle/service/apt/apt_a.h"
#include "core/hle/service/apt/apt.h"
namespace Service { namespace Service {
namespace APT { namespace APT {
@ -36,7 +36,8 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x00550040, SetScreenCapPostPermission, "SetScreenCapPostPermission"}, {0x00550040, SetScreenCapPostPermission, "SetScreenCapPostPermission"},
{0x00560000, GetScreenCapPostPermission, "GetScreenCapPostPermission"}, {0x00560000, GetScreenCapPostPermission, "GetScreenCapPostPermission"},
{0x01010000, CheckNew3DSApp, "CheckNew3DSApp"}, {0x01010000, CheckNew3DSApp, "CheckNew3DSApp"},
{0x01020000, CheckNew3DS, "CheckNew3DS"}}; {0x01020000, CheckNew3DS, "CheckNew3DS"},
};
APT_A_Interface::APT_A_Interface() { APT_A_Interface::APT_A_Interface() {
Register(FunctionTable); Register(FunctionTable);

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/apt/apt.h"
#include "core/hle/service/apt/apt_s.h" #include "core/hle/service/apt/apt_s.h"
#include "core/hle/service/apt/apt.h"
namespace Service { namespace Service {
namespace APT { namespace APT {
@ -96,7 +96,8 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x00560000, GetScreenCapPostPermission, "GetScreenCapPostPermission"}, {0x00560000, GetScreenCapPostPermission, "GetScreenCapPostPermission"},
{0x00580002, nullptr, "GetProgramID"}, {0x00580002, nullptr, "GetProgramID"},
{0x01010000, CheckNew3DSApp, "CheckNew3DSApp"}, {0x01010000, CheckNew3DSApp, "CheckNew3DSApp"},
{0x01020000, CheckNew3DS, "CheckNew3DS"}}; {0x01020000, CheckNew3DS, "CheckNew3DS"},
};
APT_S_Interface::APT_S_Interface() { APT_S_Interface::APT_S_Interface() {
Register(FunctionTable); Register(FunctionTable);

View File

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include "core/hle/service/apt/apt.h"
#include "core/hle/service/apt/apt_u.h" #include "core/hle/service/apt/apt_u.h"
#include "core/hle/service/apt/apt.h"
namespace Service { namespace Service {
namespace APT { namespace APT {
@ -96,7 +96,8 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x00560000, GetScreenCapPostPermission, "GetScreenCapPostPermission"}, {0x00560000, GetScreenCapPostPermission, "GetScreenCapPostPermission"},
{0x00580002, nullptr, "GetProgramID"}, {0x00580002, nullptr, "GetProgramID"},
{0x01010000, CheckNew3DSApp, "CheckNew3DSApp"}, {0x01010000, CheckNew3DSApp, "CheckNew3DSApp"},
{0x01020000, CheckNew3DS, "CheckNew3DS"}}; {0x01020000, CheckNew3DS, "CheckNew3DS"},
};
APT_U_Interface::APT_U_Interface() { APT_U_Interface::APT_U_Interface() {
Register(FunctionTable); Register(FunctionTable);

View File

@ -17,8 +17,7 @@ void Init() {
AddService(new BOSS_U_Interface); AddService(new BOSS_U_Interface);
} }
void Shutdown() { void Shutdown() {}
}
} // namespace BOSS } // namespace BOSS

View File

@ -24,14 +24,31 @@ enum class CameraSelect : u8 {
In1Out1 = Out1 | In1, In1Out1 = Out1 | In1,
Out1Out2 = Out1 | Out2, Out1Out2 = Out1 | Out2,
In1Out2 = In1 | Out2, In1Out2 = In1 | Out2,
All = Out1 | In1 | Out2 All = Out1 | In1 | Out2,
}; };
enum class Effect : u8 { None = 0, Mono = 1, Sepia = 2, Negative = 3, Negafilm = 4, Sepia01 = 5 }; enum class Effect : u8 {
None = 0,
Mono = 1,
Sepia = 2,
Negative = 3,
Negafilm = 4,
Sepia01 = 5,
};
enum class Context : u8 { None = 0, A = 1, B = 2, Both = A | B }; enum class Context : u8 {
None = 0,
A = 1,
B = 2,
Both = A | B,
};
enum class Flip : u8 { None = 0, Horizontal = 1, Vertical = 2, Reverse = 3 }; enum class Flip : u8 {
None = 0,
Horizontal = 1,
Vertical = 2,
Reverse = 3,
};
enum class Size : u8 { enum class Size : u8 {
VGA = 0, VGA = 0,
@ -42,7 +59,7 @@ enum class Size : u8 {
DS_LCD = 5, DS_LCD = 5,
DS_LCDx4 = 6, DS_LCDx4 = 6,
CTR_TOP_LCD = 7, CTR_TOP_LCD = 7,
CTR_BOTTOM_LCD = QVGA CTR_BOTTOM_LCD = QVGA,
}; };
enum class FrameRate : u8 { enum class FrameRate : u8 {
@ -58,10 +75,14 @@ enum class FrameRate : u8 {
Rate_30_To_5 = 9, Rate_30_To_5 = 9,
Rate_15_To_10 = 10, Rate_15_To_10 = 10,
Rate_20_To_10 = 11, Rate_20_To_10 = 11,
Rate_30_To_10 = 12 Rate_30_To_10 = 12,
}; };
enum class ShutterSoundType : u8 { Normal = 0, Movie = 1, MovieEnd = 2 }; enum class ShutterSoundType : u8 {
Normal = 0,
Movie = 1,
MovieEnd = 2,
};
enum class WhiteBalance : u8 { enum class WhiteBalance : u8 {
BalanceAuto = 0, BalanceAuto = 0,
@ -77,10 +98,16 @@ enum class WhiteBalance : u8 {
BalanceDaylight = Balance5200K, BalanceDaylight = Balance5200K,
BalanceCloudy = Balance6000K, BalanceCloudy = Balance6000K,
BalanceHorizon = Balance6000K, BalanceHorizon = Balance6000K,
BalanceShade = Balance7000K BalanceShade = Balance7000K,
}; };
enum class PhotoMode : u8 { Normal = 0, Portrait = 1, Landscape = 2, Nightview = 3, Letter0 = 4 }; enum class PhotoMode : u8 {
Normal = 0,
Portrait = 1,
Landscape = 2,
Nightview = 3,
Letter0 = 4,
};
enum class LensCorrection : u8 { enum class LensCorrection : u8 {
Off = 0, Off = 0,
@ -88,7 +115,7 @@ enum class LensCorrection : u8 {
On90 = 2, On90 = 2,
Dark = Off, Dark = Off,
Normal = On70, Normal = On70,
Bright = On90 Bright = On90,
}; };
enum class Contrast : u8 { enum class Contrast : u8 {
@ -105,10 +132,13 @@ enum class Contrast : u8 {
Pattern11 = 11, Pattern11 = 11,
Low = Pattern05, Low = Pattern05,
Normal = Pattern06, Normal = Pattern06,
High = Pattern07 High = Pattern07,
}; };
enum class OutputFormat : u8 { YUV422 = 0, RGB565 = 1 }; enum class OutputFormat : u8 {
YUV422 = 0,
RGB565 = 1,
};
/// Stereo camera calibration data. /// Stereo camera calibration data.
struct StereoCameraCalibrationData { struct StereoCameraCalibrationData {

Some files were not shown because too many files have changed in this diff Show More