diff options
| author | FearlessTobi <thm.frey@gmail.com> | 2023-10-07 17:26:04 +0200 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2023-10-07 21:24:11 -0400 |
| commit | 9ef9ca0927be1a5ee697f23ccf9f37b74ed12c7c (patch) | |
| tree | 53e7c35b0fc4ad3718019c69d1e82236413cd9e9 /src/yuzu/util/util.h | |
| parent | 7a0da729b45ae2794e84af6808c50cb714d17fc5 (diff) | |
yuzu: Add desktop shortcut support for Windows
Allows creating desktop shortcuts with icons for yuzu games.
Co-Authored-By: Jeroen van Schijndel <13182141+roenyroeny@users.noreply.github.com>
Diffstat (limited to 'src/yuzu/util/util.h')
| -rw-r--r-- | src/yuzu/util/util.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/yuzu/util/util.h b/src/yuzu/util/util.h index 39dd2d895..09c14ce3f 100644 --- a/src/yuzu/util/util.h +++ b/src/yuzu/util/util.h @@ -7,14 +7,22 @@ #include <QString> /// Returns a QFont object appropriate to use as a monospace font for debugging widgets, etc. -QFont GetMonospaceFont(); +[[nodiscard]] QFont GetMonospaceFont(); /// Convert a size in bytes into a readable format (KiB, MiB, etc.) -QString ReadableByteSize(qulonglong size); +[[nodiscard]] QString ReadableByteSize(qulonglong size); /** * Creates a circle pixmap from a specified color * @param color The color the pixmap shall have * @return QPixmap circle pixmap */ -QPixmap CreateCirclePixmapFromColor(const QColor& color); +[[nodiscard]] QPixmap CreateCirclePixmapFromColor(const QColor& color); + +/** + * Saves a windows icon to a file + * @param path The icons path + * @param image The image to save + * @return bool If the operation succeeded + */ +[[nodiscard]] bool SaveIconToFile(const std::string_view path, const QImage& image); |
