Skip to content

Commit e29141a

Browse files
committed
WIP
1 parent 90ca2a1 commit e29141a

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

FNA.NET.csproj

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('windows'))">
3-
<TargetFrameworks>netstandard2.0;net8.0;net8.0-windows;net8.0-android;net8.0-ios;net8.0-tvos</TargetFrameworks>
3+
<TargetFrameworks>netstandard2.0;net8.0;net8.0-windows;net8.0-android;net8.0-ios;net8.0-tvos;net9.0-windows10.0.26100.0</TargetFrameworks>
44
</PropertyGroup>
55
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('osx'))">
66
<TargetFrameworks>netstandard2.0;net8.0;net8.0-windows;net8.0-android;net8.0-ios;net8.0-tvos</TargetFrameworks>
@@ -395,8 +395,15 @@
395395
<Compile Include="src\Input\InputEventEXT_SDL2.cs" />
396396
</ItemGroup>
397397

398-
<ItemGroup>
398+
<ItemGroup Condition="'$(TargetFramework)' != 'net9.0-windows10.0.26100.0'">
399399
<PackageReference Include="FNA.NET.NativeAssets" Version="2.0.1.2506" />
400+
</ItemGroup>
401+
402+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0-windows10.0.26100.0'">
403+
<PackageReference Include="FNA.NET.NativeAssets.UWP" Version="1.1.0.2403" />
404+
</ItemGroup>
405+
406+
<ItemGroup>
400407
<PackageReference Include="NVorbis" Version="0.10.5" />
401408
</ItemGroup>
402409

@@ -416,6 +423,13 @@
416423
<PackageReference Include="SDLDroidSharp-JBindings" Version="3.2.16" />
417424
</ItemGroup>
418425

426+
<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0-windows10.0.26100.0'">
427+
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
428+
<UseUwp>true</UseUwp>
429+
<IsAotCompatible>true</IsAotCompatible>
430+
<DisableRuntimeMarshalling>true</DisableRuntimeMarshalling>
431+
</PropertyGroup>
432+
419433
<PropertyGroup>
420434
<PackageProjectUrl>https://github.com/FNA-NET/FNA</PackageProjectUrl>
421435
<RepositoryUrl>https://github.com/FNA-NET/FNA</RepositoryUrl>

src/FNAPlatform/FNAPlatform.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static FNAPlatform()
3737
*/
3838

3939
bool useSDL2 = Environment.GetEnvironmentVariable("FNA_PLATFORM_BACKEND") == "SDL2";
40-
#if WINDOWS_UAP
40+
#if WINDOWS10_0_17763_0_OR_GREATER
4141
useSDL2 = true;
4242
#endif
4343

src/Input/TextInputEXT.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static IntPtr WindowHandle
4343
get => windowHandle;
4444
set
4545
{
46-
#if WINDOWS7_0_OR_GREATER
46+
#if WINDOWS7_0_OR_GREATER && !WINDOWS10_0_17763_0_OR_GREATER
4747
if (value != IntPtr.Zero && windowHandle != value)
4848
AdvancedImeInit(value);
4949
#endif
@@ -65,7 +65,7 @@ public static IntPtr WindowHandle
6565
/// <returns>True if text input state is active</returns>
6666
public static bool IsTextInputActive()
6767
{
68-
#if WINDOWS7_0_OR_GREATER
68+
#if WINDOWS7_0_OR_GREATER && !WINDOWS10_0_17763_0_OR_GREATER
6969
return ImeSharp.InputMethod.Enabled;
7070
#else
7171
return FNAPlatform.IsTextInputActive(WindowHandle);
@@ -84,7 +84,7 @@ public static bool IsScreenKeyboardShown(IntPtr window)
8484

8585
public static void StartTextInput()
8686
{
87-
#if WINDOWS7_0_OR_GREATER
87+
#if WINDOWS7_0_OR_GREATER && !WINDOWS10_0_17763_0_OR_GREATER
8888
// Need to ensure SDL2 text input is stopped
8989
FNAPlatform.StopTextInput(WindowHandle);
9090
ImeSharp.InputMethod.Enabled = true;
@@ -95,7 +95,7 @@ public static void StartTextInput()
9595

9696
public static void StopTextInput()
9797
{
98-
#if WINDOWS7_0_OR_GREATER
98+
#if WINDOWS7_0_OR_GREATER && !WINDOWS10_0_17763_0_OR_GREATER
9999
ImeSharp.InputMethod.Enabled = false;
100100
#else
101101
FNAPlatform.StopTextInput(WindowHandle);
@@ -109,7 +109,7 @@ public static void StopTextInput()
109109
/// <param name="rectangle">Text input location relative to GameWindow.ClientBounds</param>
110110
public static void SetInputRectangle(Rectangle rectangle)
111111
{
112-
#if WINDOWS7_0_OR_GREATER
112+
#if WINDOWS7_0_OR_GREATER && !WINDOWS10_0_17763_0_OR_GREATER
113113
if (ImeSharp.InputMethod.Enabled)
114114
ImeSharp.InputMethod.SetTextInputRect(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
115115
#else
@@ -139,7 +139,7 @@ internal static void OnTextEditing(string text, int start, int length)
139139

140140
#endregion
141141

142-
#if WINDOWS7_0_OR_GREATER
142+
#if WINDOWS7_0_OR_GREATER && !WINDOWS10_0_17763_0_OR_GREATER
143143
internal static void AdvancedImeInit(IntPtr sdlWindowHandle)
144144
{
145145
var windowProps = SDL3.SDL.SDL_GetWindowProperties(sdlWindowHandle);

0 commit comments

Comments
 (0)