mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
wlaninf: Add sysver check since this was removed in 15.0.0.
This commit is contained in:
parent
09338f80b2
commit
5ca15e7696
@ -16,7 +16,7 @@ typedef enum {
|
|||||||
WlanInfState_Connected, ///< WLAN is connected.
|
WlanInfState_Connected, ///< WLAN is connected.
|
||||||
} WlanInfState;
|
} WlanInfState;
|
||||||
|
|
||||||
/// Initialize wlan:inf.
|
/// [1.0.0-14.1.2] Initialize wlan:inf.
|
||||||
Result wlaninfInitialize(void);
|
Result wlaninfInitialize(void);
|
||||||
|
|
||||||
/// Exit wlan:inf.
|
/// Exit wlan:inf.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#define NX_SERVICE_ASSUME_NON_DOMAIN
|
#define NX_SERVICE_ASSUME_NON_DOMAIN
|
||||||
|
#include "runtime/hosversion.h"
|
||||||
#include "service_guard.h"
|
#include "service_guard.h"
|
||||||
#include "services/wlaninf.h"
|
#include "services/wlaninf.h"
|
||||||
|
|
||||||
@ -7,6 +8,9 @@ static Service g_wlaninfSrv;
|
|||||||
NX_GENERATE_SERVICE_GUARD(wlaninf);
|
NX_GENERATE_SERVICE_GUARD(wlaninf);
|
||||||
|
|
||||||
Result _wlaninfInitialize(void) {
|
Result _wlaninfInitialize(void) {
|
||||||
|
if (hosversionAtLeast(15,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
return smGetService(&g_wlaninfSrv, "wlan:inf");
|
return smGetService(&g_wlaninfSrv, "wlan:inf");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user