From dc8479928c5aee4c6ad6fe4f59006fb604cee701 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 18 Sep 2016 09:38:01 +0900 Subject: Sources: Run clang-format on everything. --- src/citra_qt/debugger/graphics_tracing.cpp | 42 ++++++++++++++++++------------ 1 file changed, 26 insertions(+), 16 deletions(-) (limited to 'src/citra_qt/debugger/graphics_tracing.cpp') diff --git a/src/citra_qt/debugger/graphics_tracing.cpp b/src/citra_qt/debugger/graphics_tracing.cpp index 9c80f7ec9..b6f638b60 100644 --- a/src/citra_qt/debugger/graphics_tracing.cpp +++ b/src/citra_qt/debugger/graphics_tracing.cpp @@ -35,12 +35,16 @@ GraphicsTracingWidget::GraphicsTracingWidget(std::shared_ptr setObjectName("CiTracing"); QPushButton* start_recording = new QPushButton(tr("Start Recording")); - QPushButton* stop_recording = new QPushButton(QIcon::fromTheme("document-save"), tr("Stop and Save")); + QPushButton* stop_recording = + new QPushButton(QIcon::fromTheme("document-save"), tr("Stop and Save")); QPushButton* abort_recording = new QPushButton(tr("Abort Recording")); - connect(this, SIGNAL(SetStartTracingButtonEnabled(bool)), start_recording, SLOT(setVisible(bool))); - connect(this, SIGNAL(SetStopTracingButtonEnabled(bool)), stop_recording, SLOT(setVisible(bool))); - connect(this, SIGNAL(SetAbortTracingButtonEnabled(bool)), abort_recording, SLOT(setVisible(bool))); + connect(this, SIGNAL(SetStartTracingButtonEnabled(bool)), start_recording, + SLOT(setVisible(bool))); + connect(this, SIGNAL(SetStopTracingButtonEnabled(bool)), stop_recording, + SLOT(setVisible(bool))); + connect(this, SIGNAL(SetAbortTracingButtonEnabled(bool)), abort_recording, + SLOT(setVisible(bool))); connect(start_recording, SIGNAL(clicked()), this, SLOT(StartRecording())); connect(stop_recording, SIGNAL(clicked()), this, SLOT(StopRecording())); connect(abort_recording, SIGNAL(clicked()), this, SLOT(AbortRecording())); @@ -74,26 +78,31 @@ void GraphicsTracingWidget::StartRecording() { std::array default_attributes; for (unsigned i = 0; i < 16; ++i) { for (unsigned comp = 0; comp < 3; ++comp) { - default_attributes[4 * i + comp] = nihstro::to_float24(Pica::g_state.vs_default_attributes[i][comp].ToFloat32()); + default_attributes[4 * i + comp] = + nihstro::to_float24(Pica::g_state.vs_default_attributes[i][comp].ToFloat32()); } } std::array vs_float_uniforms; for (unsigned i = 0; i < 96; ++i) for (unsigned comp = 0; comp < 3; ++comp) - vs_float_uniforms[4 * i + comp] = nihstro::to_float24(Pica::g_state.vs.uniforms.f[i][comp].ToFloat32()); + vs_float_uniforms[4 * i + comp] = + nihstro::to_float24(Pica::g_state.vs.uniforms.f[i][comp].ToFloat32()); CiTrace::Recorder::InitialState state; - std::copy_n((u32*)&GPU::g_regs, sizeof(GPU::g_regs) / sizeof(u32), std::back_inserter(state.gpu_registers)); - std::copy_n((u32*)&LCD::g_regs, sizeof(LCD::g_regs) / sizeof(u32), std::back_inserter(state.lcd_registers)); - std::copy_n((u32*)&Pica::g_state.regs, sizeof(Pica::g_state.regs) / sizeof(u32), std::back_inserter(state.pica_registers)); + std::copy_n((u32*)&GPU::g_regs, sizeof(GPU::g_regs) / sizeof(u32), + std::back_inserter(state.gpu_registers)); + std::copy_n((u32*)&LCD::g_regs, sizeof(LCD::g_regs) / sizeof(u32), + std::back_inserter(state.lcd_registers)); + std::copy_n((u32*)&Pica::g_state.regs, sizeof(Pica::g_state.regs) / sizeof(u32), + std::back_inserter(state.pica_registers)); boost::copy(default_attributes, std::back_inserter(state.default_attributes)); boost::copy(shader_binary, std::back_inserter(state.vs_program_binary)); boost::copy(swizzle_data, std::back_inserter(state.vs_swizzle_data)); boost::copy(vs_float_uniforms, std::back_inserter(state.vs_float_uniforms)); - //boost::copy(TODO: Not implemented, std::back_inserter(state.gs_program_binary)); - //boost::copy(TODO: Not implemented, std::back_inserter(state.gs_swizzle_data)); - //boost::copy(TODO: Not implemented, std::back_inserter(state.gs_float_uniforms)); + // boost::copy(TODO: Not implemented, std::back_inserter(state.gs_program_binary)); + // boost::copy(TODO: Not implemented, std::back_inserter(state.gs_swizzle_data)); + // boost::copy(TODO: Not implemented, std::back_inserter(state.gs_float_uniforms)); auto recorder = new CiTrace::Recorder(state); context->recorder = std::shared_ptr(recorder); @@ -156,11 +165,12 @@ void GraphicsTracingWidget::OnEmulationStopping() { if (!context) return; - if (context->recorder) { - auto reply = QMessageBox::question(this, tr("CiTracing still active"), - tr("A CiTrace is still being recorded. Do you want to save it? If not, all recorded data will be discarded."), - QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); + auto reply = + QMessageBox::question(this, tr("CiTracing still active"), + tr("A CiTrace is still being recorded. Do you want to save it? " + "If not, all recorded data will be discarded."), + QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); if (reply == QMessageBox::Yes) { StopRecording(); -- cgit v1.2.3