feat: Enable HDPI

This commit is contained in:
Richard Ramos 2020-06-23 15:22:36 -04:00 committed by Michał
parent e4d3e5f2bf
commit 18cc92e028
2 changed files with 7 additions and 0 deletions

View File

@ -60,6 +60,8 @@ DOS_API void DOS_CALL dos_qcoreapplication_process_events(DosQEventLoopProcessEv
/// \brief Force the event loop to spin and process the given events until no more available or timed out
DOS_API void DOS_CALL dos_qcoreapplication_process_events_timed(DosQEventLoopProcessEventFlag flags, int ms);
DOS_API void DOS_CALL dos_qapplication_enable_hdpi(void);
/// \brief Create a QGuiApplication
/// \note The created QGuiApplication should be freed by calling dos_qguiapplication_delete()
DOS_API void DOS_CALL dos_qguiapplication_create(void);

View File

@ -69,6 +69,11 @@ char *dos_qcoreapplication_application_dir_path()
return convert_to_cstring(QCoreApplication::applicationDirPath());
}
void dos_qapplication_enable_hdpi()
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
}
void dos_qguiapplication_create()
{
static int argc = 1;