Skip to content

Commit

Permalink
dpi_aware: do not store pref in app ini file
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Feb 6, 2024
1 parent b9bdca7 commit c843d5c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/hello_imgui/doc_params.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ struct RunnerParams
// These pointers will be filled when the application starts
BackendPointers backendPointers;

// `rendererBackendOptions`: _see renderer_backend_options.h_
// Options for the renderer backend
RendererBackendOptions rendererBackendOptions;

// `backendType`: _enum BackendType, default=PlatformBackendType::FirstAvailable_
// Select the wanted platform backend type between `Sdl`, `Glfw`.
// if `FirstAvailable`, Glfw will be preferred over Sdl when both are available.
Expand All @@ -127,9 +131,6 @@ struct RunnerParams
// Only useful when multiple rendering backend are compiled and available.
RendererBackendType rendererBackendType = RendererBackendType::FirstAvailable;

// `rendererBackendOptions`: _see renderer_backend_options.h_
// Options for the renderer backend
RendererBackendOptions rendererBackendOptions;


// --------------- Settings -------------------
Expand Down Expand Up @@ -852,10 +853,9 @@ See [dpi_aware.h](ttps://github.com/pthom/hello_imgui/blob/master/src/hello_imgu
// you may set them manually:
// (1) Either by setting them programmatically in your application
// (set their values in `runnerParams.dpiAwareParams`)
// (2) Either by setting them in the app ini file
// (3) Either by setting them in a `hello_imgui.ini` file in the current folder, or any of its parent folders.
// (2) Either by setting them in a `hello_imgui.ini` file in the current folder, or any of its parent folders.
// (this is useful when you want to set them for a specific app or set of apps, without modifying the app code)
// Note: if several methods are used, the order of priority is (1) > (2) > (3)
// Note: if several methods are used, the order of priority is (1) > (2)
//
// Example content of a ini file:
// ------------------------------
Expand Down
5 changes: 2 additions & 3 deletions src/hello_imgui/dpi_aware.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ namespace HelloImGui
// you may set them manually:
// (1) Either by setting them programmatically in your application
// (set their values in `runnerParams.dpiAwareParams`)
// (2) Either by setting them in the app ini file
// (3) Either by setting them in a `hello_imgui.ini` file in the current folder, or any of its parent folders.
// (2) Either by setting them in a `hello_imgui.ini` file in the current folder, or any of its parent folders.
// (this is useful when you want to set them for a specific app or set of apps, without modifying the app code)
// Note: if several methods are used, the order of priority is (1) > (2) > (3)
// Note: if several methods are used, the order of priority is (1) > (2)
//
// Example content of a ini file:
// ------------------------------
Expand Down
9 changes: 5 additions & 4 deletions src/hello_imgui/internal/backend_impls/abstract_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,9 @@ void ReadDpiAwareParams(const std::string& appIniSettingLocation, DpiAwareParams
// you may set them manually:
// (1) Either by setting them programmatically in your application
// (set their values in `runnerParams.dpiAwareParams`)
// (2) Either by setting them in the app ini file
// (3) Either by setting them in a `hello_imgui.ini` file in the current folder, or any of its parent folders.
// (2) Either by setting them in a `hello_imgui.ini` file in the current folder, or any of its parent folders.
// (this is useful when you want to set them for a specific app or set of apps, without modifying the app code)
// Note: if several methods are used, the order of priority is (1) > (2) > (3)
// Note: if several methods are used, the order of priority is (1) > (2)
//
// Example content of a ini file:
// ------------------------------
Expand Down Expand Up @@ -259,7 +258,9 @@ void ReadDpiAwareParams(const std::string& appIniSettingLocation, DpiAwareParams
auto allIniFilesToSearch = [&]() -> std::vector<std::string>
{
std::vector<std::string> allIniFileToSearch;
allIniFileToSearch.push_back(appIniSettingLocation);

//allIniFileToSearch.push_back(appIniSettingLocation);
(void)appIniSettingLocation;

std::string currentFolder = std::filesystem::current_path().string();
for (const auto& folder: folderAndAllParents(currentFolder))
Expand Down

0 comments on commit c843d5c

Please sign in to comment.