mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
RemoteISOScreen: Don't check "allowed" every frame.
This commit is contained in:
@@ -291,13 +291,16 @@ void RemoteISOScreen::CreateTabs() {
|
||||
void RemoteISOScreen::update() {
|
||||
TabbedUIDialogScreenWithGameBackground::update();
|
||||
|
||||
if (!WebServerStopped(WebServerFlags::DISCS)) {
|
||||
frameCount_++;
|
||||
|
||||
if (!WebServerStopped(WebServerFlags::DISCS) && frameCount_ > 60) {
|
||||
auto result = IsServerAllowed(g_Config.iRemoteISOPort);
|
||||
if (result == ServerAllowStatus::NO) {
|
||||
firewallWarning_->SetVisibility(V_VISIBLE);
|
||||
} else if (result == ServerAllowStatus::YES) {
|
||||
firewallWarning_->SetVisibility(V_GONE);
|
||||
}
|
||||
frameCount_ = 0;
|
||||
}
|
||||
|
||||
bool nowRunning = !WebServerStopped(WebServerFlags::DISCS);
|
||||
@@ -422,6 +425,7 @@ UI::EventReturn RemoteISOScreen::OnChangeRemoteISOSubdir(UI::EventParams &e) {
|
||||
}
|
||||
|
||||
UI::EventReturn RemoteISOScreen::HandleStartServer(UI::EventParams &e) {
|
||||
frameCount_ = 0;
|
||||
if (!StartWebServer(WebServerFlags::DISCS)) {
|
||||
return EVENT_SKIPPED;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ protected:
|
||||
UI::TextView *firewallWarning_ = nullptr;
|
||||
bool serverRunning_ = false;
|
||||
bool serverStopping_ = false;
|
||||
|
||||
int frameCount_ = 0;
|
||||
};
|
||||
|
||||
enum class ScanStatus {
|
||||
|
||||
Reference in New Issue
Block a user