mirror of
https://github.com/AssetRipper/NativeFileDialogs.NET.git
synced 2026-11-13 20:05:46 -10:00
Fix string marshalling on Windows
This commit is contained in:
1 parent
92ddd55a44
commit
970c846e38
12 files changed
+847
-617
No files matched your search
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Speykious
|
||||
// Copyright (c) Speykious
|
||||
// This file is part of NativeFileDialogs.NET.
|
||||
// NativeFileDialogs.NET is licensed under the Zlib License. See LICENSE for details.
|
||||
|
||||
@@ -9,14 +9,14 @@ unsafe
|
||||
{
|
||||
nfd.NFD_Init();
|
||||
|
||||
NfdnfilteritemT[] filterItem = new[]
|
||||
Nfdu8filteritemT[] filterItem = new[]
|
||||
{
|
||||
new NfdnfilteritemT
|
||||
new Nfdu8filteritemT
|
||||
{
|
||||
Name = "Source code",
|
||||
Spec = "c,cpp,cc",
|
||||
},
|
||||
new NfdnfilteritemT
|
||||
new Nfdu8filteritemT
|
||||
{
|
||||
Name = "Headers",
|
||||
Spec = "h,hpp",
|
||||
@@ -24,7 +24,7 @@ unsafe
|
||||
};
|
||||
|
||||
sbyte* outPathPtr;
|
||||
NfdresultT result = nfd.NFD_OpenDialogN(&outPathPtr, filterItem, (uint)filterItem.Length, null);
|
||||
NfdresultT result = nfd.NFD_OpenDialogU8(&outPathPtr, filterItem, (uint)filterItem.Length, null);
|
||||
switch (result)
|
||||
{
|
||||
case NfdresultT.NFD_OKAY:
|
||||
|
||||
Reference in new issue
Block a user