Minor Style Fixes

This commit is contained in:
Florian Märkl 2021-01-01 15:24:53 +01:00
commit 49d65ad14a
No known key found for this signature in database
GPG key ID: 125BC8A5A6A1E857
32 changed files with 248 additions and 304 deletions

View file

@ -109,7 +109,6 @@ static const float vert_pos[] = {
1.0f, 1.0f
};
QSurfaceFormat AVOpenGLWidget::CreateSurfaceFormat()
{
QSurfaceFormat format;
@ -129,7 +128,7 @@ AVOpenGLWidget::AVOpenGLWidget(StreamSession *session, QWidget *parent)
{
enum AVPixelFormat pixel_format = chiaki_ffmpeg_decoder_get_pixel_format(session->GetFfmpegDecoder());
conversion_config = nullptr;
for(auto &cc: conversion_configs)
for(auto &cc : conversion_configs)
{
if(pixel_format == cc.pixel_format)
{

View file

@ -68,7 +68,6 @@ static QSet<QString> chiaki_motion_controller_guids({
"030000008f0e00001431000000000000",
});
static ControllerManager *instance = nullptr;
#define UPDATE_INTERVAL_MS 4

View file

@ -111,7 +111,7 @@ int real_main(int argc, char *argv[])
if(args[0] == "list")
{
for(const auto &host : settings.GetRegisteredHosts())
printf("Host: %s \n", host.GetServerNickname().toLocal8Bit().constData());
printf("Host: %s \n", host.GetServerNickname().toLocal8Bit().constData());
return 0;
}
if(args[0] == "stream")

View file

@ -167,7 +167,7 @@ MainWindow::MainWindow(Settings *settings, QWidget *parent)
grid_widget->setContentsMargins(0, 0, 0, 0);
resize(800, 600);
connect(&discovery_manager, &DiscoveryManager::HostsUpdated, this, &MainWindow::UpdateDisplayServers);
connect(settings, &Settings::RegisteredHostsUpdated, this, &MainWindow::UpdateDisplayServers);
connect(settings, &Settings::ManualHostsUpdated, this, &MainWindow::UpdateDisplayServers);
@ -330,7 +330,7 @@ void MainWindow::UpdateDisplayServers()
display_servers.append(server);
}
UpdateServerWidgets();
}

View file

@ -88,10 +88,10 @@ uint32_t Settings::GetLogLevelMask()
}
static const QMap<ChiakiVideoResolutionPreset, QString> resolutions = {
{ CHIAKI_VIDEO_RESOLUTION_PRESET_360p, "360p"},
{ CHIAKI_VIDEO_RESOLUTION_PRESET_540p, "540p"},
{ CHIAKI_VIDEO_RESOLUTION_PRESET_720p, "720p"},
{ CHIAKI_VIDEO_RESOLUTION_PRESET_1080p, "1080p"}
{ CHIAKI_VIDEO_RESOLUTION_PRESET_360p, "360p" },
{ CHIAKI_VIDEO_RESOLUTION_PRESET_540p, "540p" },
{ CHIAKI_VIDEO_RESOLUTION_PRESET_720p, "720p" },
{ CHIAKI_VIDEO_RESOLUTION_PRESET_1080p, "1080p" }
};
static const ChiakiVideoResolutionPreset resolution_default = CHIAKI_VIDEO_RESOLUTION_PRESET_720p;
@ -136,8 +136,8 @@ void Settings::SetBitrate(unsigned int bitrate)
}
static const QMap<ChiakiCodec, QString> codecs = {
{ CHIAKI_CODEC_H264, "h264"},
{ CHIAKI_CODEC_H265, "h265"}
{ CHIAKI_CODEC_H264, "h264" },
{ CHIAKI_CODEC_H265, "h265" }
};
static const ChiakiCodec codec_default = CHIAKI_CODEC_H265;

View file

@ -89,7 +89,7 @@ SettingsDialog::SettingsDialog(Settings *settings, QWidget *parent) : QDialog(pa
connect(disconnect_action_combo_box, SIGNAL(currentIndexChanged(int)), this, SLOT(DisconnectActionSelected()));
general_layout->addRow(tr("Action on Disconnect:"), disconnect_action_combo_box);
audio_device_combo_box = new QComboBox(this);
audio_device_combo_box->addItem(tr("Auto"));
auto current_audio_device = settings->GetAudioOutDevice();
@ -112,7 +112,7 @@ SettingsDialog::SettingsDialog(Settings *settings, QWidget *parent) : QDialog(pa
auto available_devices = audio_devices_future_watcher->result();
while(audio_device_combo_box->count() > 1) // remove all but "Auto"
audio_device_combo_box->removeItem(1);
for (QAudioDeviceInfo di : available_devices)
for(QAudioDeviceInfo di : available_devices)
audio_device_combo_box->addItem(di.deviceName(), di.deviceName());
int audio_out_device_index = audio_device_combo_box->findData(settings->GetAudioOutDevice());
audio_device_combo_box->setCurrentIndex(audio_out_device_index < 0 ? 0 : audio_out_device_index);
@ -136,10 +136,10 @@ SettingsDialog::SettingsDialog(Settings *settings, QWidget *parent) : QDialog(pa
resolution_combo_box = new QComboBox(this);
static const QList<QPair<ChiakiVideoResolutionPreset, const char *>> resolution_strings = {
{ CHIAKI_VIDEO_RESOLUTION_PRESET_360p, "360p"},
{ CHIAKI_VIDEO_RESOLUTION_PRESET_540p, "540p"},
{ CHIAKI_VIDEO_RESOLUTION_PRESET_720p, "720p"},
{ CHIAKI_VIDEO_RESOLUTION_PRESET_1080p, "1080p (PS5 and PS4 Pro only)"}
{ CHIAKI_VIDEO_RESOLUTION_PRESET_360p, "360p" },
{ CHIAKI_VIDEO_RESOLUTION_PRESET_540p, "540p" },
{ CHIAKI_VIDEO_RESOLUTION_PRESET_720p, "720p" },
{ CHIAKI_VIDEO_RESOLUTION_PRESET_1080p, "1080p (PS5 and PS4 Pro only)" }
};
auto current_res = settings->GetResolution();
for(const auto &p : resolution_strings)

View file

@ -7,7 +7,7 @@
#include <QVBoxLayout>
#include <QKeyEvent>
SettingsKeyCaptureDialog::SettingsKeyCaptureDialog(QWidget* parent)
SettingsKeyCaptureDialog::SettingsKeyCaptureDialog(QWidget *parent)
{
setWindowTitle(tr("Key Capture"));
@ -23,7 +23,7 @@ SettingsKeyCaptureDialog::SettingsKeyCaptureDialog(QWidget* parent)
connect(button, &QPushButton::clicked, this, &QDialog::accept);
}
void SettingsKeyCaptureDialog::keyReleaseEvent(QKeyEvent* event)
void SettingsKeyCaptureDialog::keyReleaseEvent(QKeyEvent *event)
{
KeyCaptured(Qt::Key(event->key()));
accept();