Fixed all the warnings and reverted a change to 86box.c that was not supposed to be committed.
This commit is contained in:
@@ -776,8 +776,8 @@ plat_set_thread_name(void *thread, const char *name)
|
||||
|
||||
if (pSetThreadDescription) {
|
||||
size_t len = strlen(name) + 1;
|
||||
wchar_t wname[len + 1];
|
||||
mbstowcs(wname, name, len);
|
||||
wchar_t wname[2048];
|
||||
mbstowcs(wname, name, (len >= 1024) ? 1024 : len);
|
||||
pSetThreadDescription(thread ? (HANDLE) thread : GetCurrentThread(), wname);
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -236,7 +236,6 @@ VMManagerMain::shutdownForceButtonPressed() const
|
||||
void
|
||||
VMManagerMain::refresh()
|
||||
{
|
||||
bool running = selected_sysconfig->process->state() == QProcess::ProcessState::Running;
|
||||
const auto current_index = ui->listView->currentIndex();
|
||||
emit selectionChanged(current_index, selected_sysconfig->process->state());
|
||||
|
||||
|
||||
@@ -747,18 +747,20 @@ VMManagerSystem::setupVars() {
|
||||
QStringList serialFinal;
|
||||
QStringList lptFinal;
|
||||
int portIndex = 0;
|
||||
for(const auto &serialNum: serial_enabled) {
|
||||
if (serial_enabled[portIndex]) {
|
||||
while (true) {
|
||||
if (serial_enabled[portIndex])
|
||||
serialFinal.append(QString("COM%1").arg(portIndex + 1));
|
||||
}
|
||||
++portIndex;
|
||||
if (portIndex == SERIAL_MAX)
|
||||
break;
|
||||
}
|
||||
portIndex = 0;
|
||||
for (const auto &lptNum: lpt_enabled) {
|
||||
if (lpt_enabled[portIndex]) {
|
||||
while (true) {
|
||||
if (lpt_enabled[portIndex])
|
||||
lptFinal.append(QString("LPT%1").arg(portIndex + 1));
|
||||
}
|
||||
++portIndex;
|
||||
if (portIndex == PARALLEL_MAX)
|
||||
break;
|
||||
}
|
||||
display_table[Display::Name::Serial] = serialFinal.empty() ? tr("None") : serialFinal.join(", ");
|
||||
display_table[Display::Name::Parallel] = lptFinal.empty() ? tr("None") : lptFinal.join(", ");
|
||||
|
||||
Reference in New Issue
Block a user