Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build problems with MSVC #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions osdialog_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ char* osdialog_prompt(osdialog_message_level level, const char* message, const c
}


static INT CALLBACK browseCallbackProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
static INT CALLBACK browseCallbackProc(HWND hWnd, UINT Msg, LPARAM lParam, LPARAM lpData) {
if (Msg == BFFM_INITIALIZED) {
SendMessageW(hWnd, BFFM_SETEXPANDED, 1, lParam);
SendMessageW(hWnd, BFFM_SETEXPANDED, 1, lpData);
}
return 0;
}
Expand Down Expand Up @@ -117,7 +117,7 @@ char* osdialog_file(osdialog_file_action action, const char* path, const char* f
wchar_t strFile[MAX_PATH] = L"";
if (filename) {
wchar_t* filenameW = utf8_to_wchar(filename);
snwprintf(strFile, MAX_PATH, L"%S", filenameW);
wcsncpy_s(strFile, MAX_PATH, filenameW, _TRUNCATE);
OSDIALOG_FREE(filenameW);
}
ofn.lpstrFile = strFile;
Expand Down