CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Core/Dialog/PSPNetconfDialog.h
Views: 1401
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
38
class PSPNetconfDialog: public PSPDialog {
39
public:
40
PSPNetconfDialog(UtilityDialogType type);
41
~PSPNetconfDialog();
42
43
int Init(u32 paramAddr);
44
int Update(int animSpeed) override;
45
int Shutdown(bool force = false) override;
46
void DoState(PointerWrap &p) override;
47
pspUtilityDialogCommon* GetCommonParam() override;
48
49
protected:
50
bool UseAutoStatus() override {
51
return false;
52
}
53
54
private:
55
void DisplayMessage(std::string_view text1, std::string_view text2a = "", std::string_view text2b = "", std::string_view text3a = "", std::string_view text3b = "", bool hasYesNo = false, bool hasOK = false);
56
void DrawBanner();
57
void DrawIndicator();
58
59
SceUtilityNetconfParam request = {};
60
u32 requestAddr = 0;
61
int connResult = -1;
62
bool hideNotice = false;
63
64
int yesnoChoice = 0;
65
float scrollPos_ = 0.0f;
66
int framesUpHeld_ = 0;
67
int framesDownHeld_ = 0;
68
69
u32 scanInfosAddr = 0;
70
int scanStep = 0;
71
u64 startTime = 0;
72
};
73
74