Clang-format fixed
This commit is contained in:
parent
f5fbf3a1f5
commit
a950cda919
3 changed files with 9 additions and 7 deletions
|
@ -35,9 +35,11 @@ std::u8string_view BufferToU8StringView(std::span<const u8> buffer) {
|
|||
|
||||
std::wstring ToWString(std::u8string_view utf8_string) {
|
||||
#ifdef _WIN32
|
||||
int size_needed = MultiByteToWideChar(CP_UTF8, 0, reinterpret_cast<const char*>(utf8_string.data()), -1, NULL, 0);
|
||||
int size_needed = MultiByteToWideChar(
|
||||
CP_UTF8, 0, reinterpret_cast<const char*>(utf8_string.data()), -1, NULL, 0);
|
||||
std::wstring wstr(size_needed, 0);
|
||||
MultiByteToWideChar(CP_UTF8, 0, reinterpret_cast<const char*>(utf8_string.data()), -1, &wstr[0], size_needed);
|
||||
MultiByteToWideChar(CP_UTF8, 0, reinterpret_cast<const char*>(utf8_string.data()), -1, &wstr[0],
|
||||
size_needed);
|
||||
return wstr;
|
||||
#else
|
||||
return std::wstring{utf8_string.begin(), utf8_string.end()};
|
||||
|
|
|
@ -3137,7 +3137,8 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const QString& game_p
|
|||
// Save the QPixmap as an .ico file
|
||||
QList<QPixmap> pixmaps;
|
||||
pixmaps.append(pixmap);
|
||||
if (!savePixmapsToICO(pixmaps, QString::fromStdWString(Common::FS::ToWString(icon_path.u8string())))) {
|
||||
if (!savePixmapsToICO(pixmaps,
|
||||
QString::fromStdWString(Common::FS::ToWString(icon_path.u8string())))) {
|
||||
LOG_ERROR(Frontend, "Could not write icon as ICO to file");
|
||||
} else {
|
||||
LOG_INFO(Frontend, "Wrote an icon to {}", icon_path.string());
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
#include <cmath>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <QPainter>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QTemporaryFile>
|
||||
#include <QImage>
|
||||
#include <QPixmap>
|
||||
#include <QList>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QString>
|
||||
#include <QTemporaryFile>
|
||||
|
||||
#include "yuzu/util/util.h"
|
||||
|
||||
|
@ -77,7 +77,6 @@ bool savePixmapsToICO(const QList<QPixmap>& pixmaps, const QString& path) {
|
|||
const auto& pixmap = pixmaps[ii];
|
||||
pixmap.save(&temp, "PNG");
|
||||
|
||||
|
||||
temp.close();
|
||||
|
||||
images_size.push_back(QFileInfo(temp).size());
|
||||
|
|
Loading…
Add table
Reference in a new issue