Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/Core/Dialog/PSPNetconfDialog.h
3186 views
1
// Copyright (c) 2012- PPSSPP Project.
2
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
6
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
11
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
14
15
// Official git repository and contact information can be found at
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
17
18
#pragma once
19
20
#include "Core/Dialog/PSPDialog.h"
21
#include "Core/MemMapHelpers.h"
22
23
struct SceUtilityNetconfData {
24
char groupName[8];
25
int timeout;
26
};
27
28
struct SceUtilityNetconfParam {
29
pspUtilityDialogCommon common;
30
int netAction; // sets how to connect
31
PSPPointer<SceUtilityNetconfData> NetconfData;
32
int netHotspot; // Flag to allow hotspot connections
33
int netHotspotConnected; // Flag to check if a hotspot connection is active
34
int netWifiSpot; // Flag to allow WIFI connections
35
};
36
37
class PSPNetconfDialog : public PSPDialog {
38
public:
39
PSPNetconfDialog(UtilityDialogType type) : PSPDialog(type) {}
40
41
int Init(u32 paramAddr);
42
int Update(int animSpeed) override;
43
int Shutdown(bool force = false) override;
44
void DoState(PointerWrap &p) override;
45
pspUtilityDialogCommon* GetCommonParam() override;
46
47
protected:
48
bool UseAutoStatus() override {
49
return false;
50
}
51
52
private:
53
void DrawBanner();
54
void DrawIndicator();
55
56
SceUtilityNetconfParam request = {};
57
u32 requestAddr = 0;
58
int connResult = -1;
59
60
u32 scanInfosAddr = 0;
61
int scanStep = 0;
62
u64 startTime = 0;
63
64
bool showNoWlanNotice_ = false;
65
bool jsonReady_ = false;
66
};
67
68