summaryrefslogtreecommitdiff
path: root/src/toBeSorted/mpls.cpp
blob: 20c23e1c872176699dd8db091c353a6c7959f239 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "toBeSorted/mpls.h"

#include "s/s_Assert.h"

#include "rvl/OS.h"
#include "rvl/SC.h"

#include <cstring>

bool sMplsInitialized;
bool sSkipMplsMovie;
bool sIsNormalMode;

void Mpls::initialize(int argc, char **argv) {
    if (argc == 2) {
        if (strcmp("MPLS_FIRST", argv[1]) == 0) {
            sSkipMplsMovie = true;
        } else if (strcmp("MPLS_NORMAL", argv[1]) == 0) {
            sSkipMplsMovie = true;
            sIsNormalMode = true;
        }
    }

    sMplsInitialized = true;
}

void Mpls::tryLaunchMovie() {
    if (!sSkipMplsMovie && !SCGetMplsMoviePlay()) {
        OSExecl("/sys/mpls_movie/player.dol", "", "", "ASPECT_RATIO_AUTO", "DEFAULT", nullptr);
        sAssert::assert();
    }
}

void Mpls::forceLaunchMovie() {
    OSExecl("/sys/mpls_movie/player.dol", "", "", "ASPECT_RATIO_AUTO", "FORCE_MENU", nullptr);
    sAssert::assert();
}