Skip to content

Commit

Permalink
Use DLLImport instead of LibraryImport to fix wallpaper not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 committed Mar 23, 2023
1 parent b36f354 commit 3803d61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PicView/SystemIntegration/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public override int GetHashCode()
internal static partial bool SetCursorPos(int x, int y);

// Used to check for wallpaper support
[LibraryImport("user32.dll", SetLastError = true, StringMarshalling = StringMarshalling.Utf16)]
[DllImport("user32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static partial bool SystemParametersInfo(uint uiAction, uint uiParam,
internal static extern bool SystemParametersInfo(uint uiAction, uint uiParam,
string pvParam, uint fWinIni);

#region Disable Screensaver and Power options
Expand Down

0 comments on commit 3803d61

Please sign in to comment.