tallbl0nde / TriPlayer

A feature-rich background audio player for Nintendo Switch (requires Atmosphere)
MIT License
174 stars 23 forks source link

NX.cpp:158:41: error: 'ApmCpuBoostMode_Type1' was not declared in this scope; did you mean 'ApmCpuBoostMode_Type2'? #36

Closed bao3 closed 3 years ago

bao3 commented 3 years ago

I git clone the source and compiled by myself. But I got the error

NX.cpp: error: 'ApmCpuBoostMode_Type1' was not declared in this scope; did you mean 'ApmCpuBoostMode_Type2'?

NX.cpp: error: 'ApmCpuBoostMode_Disabled' was not declared in this scope; did you mean 'ApmCpuBoostMode_FastLoad'?

I search the code

static bool boost = false;
    void setCPUBoost(bool enable) {
        // Only set if different state
        if (enable == boost) {
            return;
        }

        appletSetCpuBoostMode((enable ? ApmCpuBoostMode_Type1 : ApmCpuBoostMode_Disabl
ed));
        boost = enable;
    }

ApmCpuBoostMode_Type1 and ApmCpuBoostMode_Disabled did not be defined . How should I do to fix thix

Compiling utils/Curl.o... Compiling utils/Image.o... Compiling utils/Search.o... Compiling utils/Splash.o... Compiling utils/Timer.o... Compiling utils/Utils.o... Compiling utils/Zip.o... Compiling utils/NX.o... source/utils/NX.cpp: In function 'void Utils::NX::setCPUBoost(bool)': source/utils/NX.cpp:158:41: error: 'ApmCpuBoostMode_Type1' was not declared in this scope; did you mean 'ApmCpuBoostMode_Type2'? 158 | appletSetCpuBoostMode((enable ? ApmCpuBoostMode_Type1 : ApmCpuBoostMode_Disabled)); | ^~~~~ | ApmCpuBoostMode_Type2 source/utils/NX.cpp:158:65: error: 'ApmCpuBoostMode_Disabled' was not declared in this scope; did you mean 'ApmCpuBoostMode_FastLoad'? 158 | appletSetCpuBoostMode((enable ? ApmCpuBoostMode_Type1 : ApmCpuBoostMode_Disabled)); | ^~~~~~~~ | ApmCpuBoostMode_FastLoad make[1]: [Makefile:114: build/objs/utils/NX.o] Error 1 make: [Makefile:19: all] Error 2

tallbl0nde commented 3 years ago

My guess is you're compiling with the latest version of libnx - I haven't added support for that yet. You'll need to use the last version of libnx in order to compile it in the meantime.

bao3 commented 3 years ago

Ok... ... I just modified 3 files to add Chinese translation, and I never tried the libnx . I would wait you to fix that

发自我的iPhone

在 2021年1月13日,下午3:24,tallbl0nde notifications@github.com 写道:

 My guess is you're compiling with the latest version of libnx - I haven't added support for that yet. You'll need to use the last version of libnx in order to compile it in the meantime.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.