Skip to content

Conversation

@ineedhelpbad
Copy link
Contributor

Adds: [Feature Request] Pause on focus loss #191

@ineedhelpbad ineedhelpbad changed the base branch from master to nightly August 20, 2020 05:14
Bitl added a commit to Bitl/sm64ex that referenced this pull request Dec 22, 2020
Bitl added a commit to Bitl/sm64ex that referenced this pull request Dec 22, 2020
@Bitl
Copy link

Bitl commented Dec 22, 2020

the commits on my branch add functions that allow for the game to check whether we should pause the game with the same conditions as the pause menu

u32 can_pause(void) {
    u32 val4 = get_dialog_id() >= 0;
    u32 intangible = (gMarioState->action & ACT_FLAG_INTANGIBLE) != 0;

    if (!intangible && !val4 && !gWarpTransition.isActive && sDelayedWarpOp == WARP_OP_NONE) {
        return TRUE;
    }

    return FALSE;
}

u32 pressed_pause(void) {
    if (can_pause() && (gPlayer1Controller->buttonPressed & START_BUTTON)) {
        return TRUE;
    }

    return FALSE;
}

u32 lost_focus(void) {
    if (can_pause() && (focus_Lost == TRUE)) {
        return TRUE;
    }

    return FALSE;
}

@coavins
Copy link

coavins commented Sep 12, 2022

I would definitely ask that this be made optional.

djoslin0 pushed a commit to djoslin0/sm64ex-coop that referenced this pull request Jun 24, 2023
I remember it being more than 32 at some point but I could be wrong, I'm making this PR so color codes can be better utilized in names without hitting the max limit so quickly.
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.

3 participants