Skip to content

Commit e82cfc6

Browse files
author
hongqingwan
committed
frontend: Fix startup crash in qwindows.dll on Windows 11 24H2 with OBS 32.0.2 and 31.x portable
1 parent 32ba0c3 commit e82cfc6

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

frontend/utility/platform-windows.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,6 @@ void SetProcessPriority(const char *priority)
195195
SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
196196
}
197197

198-
void SetWin32DropStyle(QWidget *window)
199-
{
200-
HWND hwnd = (HWND)window->winId();
201-
LONG_PTR ex_style = GetWindowLongPtr(hwnd, GWL_EXSTYLE);
202-
ex_style |= WS_EX_ACCEPTFILES;
203-
SetWindowLongPtr(hwnd, GWL_EXSTYLE, ex_style);
204-
}
205-
206198
bool SetDisplayAffinitySupported(void)
207199
{
208200
static bool checked = false;

frontend/utility/platform.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ CheckIfAlreadyRunning(bool &already_running);
5858
uint32_t GetWindowsVersion();
5959
uint32_t GetWindowsBuild();
6060
void SetProcessPriority(const char *priority);
61-
void SetWin32DropStyle(QWidget *window);
6261
bool DisableAudioDucking(bool disable);
6362

6463
struct RunOnceMutexData;

frontend/widgets/OBSBasic.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,9 @@ void OBSBasic::OBSInit()
11441144
(opt_minimize_tray || sysTrayWhenStarted);
11451145

11461146
#ifdef _WIN32
1147-
SetWin32DropStyle(this);
1147+
if (acceptDrops()) {
1148+
setAcceptDrops(true);
1149+
}
11481150

11491151
if (!hideWindowOnStart)
11501152
show();

0 commit comments

Comments
 (0)