JosefNemec/Playnite · error · NotSupportedInDesktopException

Not supported in Desktop mode.

Error message

Not supported in Desktop mode.

What it means

Thrown by the Desktop-mode IMainViewAPI.ToggleFullscreenView implementation. The shared MainViewAPI contract is implemented twice (Desktop and Fullscreen), and this particular method is a no-op stub in Desktop mode that intentionally throws NotSupportedInDesktopException. It signals an operation that only has a meaningful body in the Fullscreen host.

Source

Thrown at source/Playnite.DesktopApp/Api/MainViewAPI.cs:161

            if (!games.HasItems())
                return null;

            return mainModel.GamesEditor.EditGames(games);
        }

        public List<FilterPreset> GetSortedFilterPresets()
        {
            return mainModel.SortedFilterPresets.ToList();
        }

        public List<FilterPreset> GetSortedFilterFullscreenPresets()
        {
            return mainModel.SortedFilterFullscreenPresets.ToList();
        }

        public void ToggleFullscreenView()
        {
            throw new NotSupportedInDesktopException();
        }
    }
}

View on GitHub (pinned to 5911f4e964)

Solutions

  1. Gate the call on the current application mode before invoking (check PlayniteApi.ApplicationInfo or the host mode).
  2. Move the toggle logic into a mode-aware path that only calls this in Fullscreen mode.
  3. If fullscreen switching is needed from Desktop, use the supported Desktop mechanism (e.g. application restart / mode switch) rather than this API.

Example fix

// before
PlayniteApi.MainView.ToggleFullscreenView();

// after
if (PlayniteApi.ApplicationInfo.Mode == ApplicationMode.Fullscreen)
{
    PlayniteApi.MainView.ToggleFullscreenView();
}
Defensive patterns

Strategy: validation

Validate before calling

if (PlayniteApi.ApplicationInfo.Mode == ApplicationMode.Fullscreen)
{
    PlayniteApi.MainView.ToggleFullscreenView();
}

Try / catch

try { PlayniteApi.MainView.ToggleFullscreenView(); }
catch (NotSupportedInDesktopException) { /* Desktop host: no-op */ }

Prevention

When it happens

Trigger: An extension or script calls PlayniteApi.MainView.ToggleFullscreenView() while the application is running in ApplicationMode.Desktop. The Desktop MainViewAPI is the active implementation, so the stub executes.

Common situations: A plugin written against the Fullscreen host running under the Desktop host; a generic command wired to a hotkey without checking the active mode; SDK samples copied without adapting to the host.

Related errors


AI-assisted analysis of JosefNemec/Playnite@5911f4e964 (2026-08-13). Data as JSON: /api/errors/d44e0b902ee677d6. Report an issue: GitHub.