mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
sys: Added setting to override borderless window mode even on Intel
This commit is contained in:
@@ -241,7 +241,7 @@ namespace hex {
|
||||
// Setup borderless window
|
||||
auto hwnd = glfwGetWin32Window(this->m_window);
|
||||
|
||||
if (this->m_useBorderlessWindow) {
|
||||
if (ImHexApi::System::isBorderlessWindowModeEnabled()) {
|
||||
g_oldWndProc = ::SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)windowProc);
|
||||
|
||||
MARGINS borderless = { 1, 1, 1, 1 };
|
||||
@@ -300,7 +300,7 @@ namespace hex {
|
||||
}
|
||||
|
||||
void Window::drawTitleBar() {
|
||||
if (!this->m_useBorderlessWindow) return;
|
||||
if (!ImHexApi::System::isBorderlessWindowModeEnabled()) return;
|
||||
|
||||
auto buttonSize = ImVec2(g_titleBarHeight * 1.5F, g_titleBarHeight - 1);
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace hex {
|
||||
buf->append("\n");
|
||||
}
|
||||
|
||||
Window::Window(bool borderlessWindow) : m_useBorderlessWindow(borderlessWindow) {
|
||||
Window::Window() {
|
||||
{
|
||||
for (const auto &[argument, value] : ImHexApi::System::getInitArguments()) {
|
||||
if (argument == "no-plugins") {
|
||||
@@ -289,7 +289,7 @@ namespace hex {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
|
||||
if (ImGui::BeginMainMenuBar()) {
|
||||
|
||||
if (this->m_useBorderlessWindow) {
|
||||
if (ImHexApi::System::isBorderlessWindowModeEnabled()) {
|
||||
auto menuBarHeight = ImGui::GetCurrentWindow()->MenuBarHeight();
|
||||
ImGui::SetCursorPosX(5);
|
||||
ImGui::Image(this->m_logoTexture, ImVec2(menuBarHeight, menuBarHeight));
|
||||
@@ -501,7 +501,7 @@ namespace hex {
|
||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
|
||||
#endif
|
||||
|
||||
glfwWindowHint(GLFW_DECORATED, this->m_useBorderlessWindow ? GL_FALSE : GL_TRUE);
|
||||
glfwWindowHint(GLFW_DECORATED, ImHexApi::System::isBorderlessWindowModeEnabled() ? GL_FALSE : GL_TRUE);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
|
||||
Reference in New Issue
Block a user