Skip to content

Conversation

@st14n
Copy link

@st14n st14n commented Nov 19, 2025

I've got this to work using these few small changes.

On my electron app I used something like

let steamInitialized = false;
let steamOverlayEnabled = null;

try {
    console.log("Initializing Steam with app ID: XXX");
    const steamworks = require('steamworks.js');
    global.steamClient = steamworks.init(XXX);
    require('steamworks.js').electronEnableSteamOverlay();
    console.log("Steam initialized successfully");

    setTimeout(() => {
        try {
            const overlayEnabled = steamworks.isOverlayEnabled();
            steamOverlayEnabled = overlayEnabled;
            console.log('Steam overlay enabled (delayed):', overlayEnabled);
        } catch (e) {
            console.error('Failed to query overlay status:', e);
        }
    }, 3000);

    steamInitialized = true;
} catch (e) {
    console.error("Failed to initialize Steam:", e.message);
    steamInitialized = false;
}

Key was waiting - in this example 3 seconds - before checking enabled status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant