mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-28 16:53:40 +01:00
Logging improvements, cleanup
This commit is contained in:
1 parent
c46d6e16b8
commit
356cc64eb5
3 files changed
+11
-13
No files matched your search
@@ -11,16 +11,15 @@
|
||||
#include "Common/Log.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
|
||||
ScreenManager::ScreenManager() {
|
||||
uiContext_ = 0;
|
||||
dialogFinished_ = 0;
|
||||
}
|
||||
#include "Core/KeyMap.h"
|
||||
|
||||
ScreenManager::~ScreenManager() {
|
||||
shutdown();
|
||||
}
|
||||
|
||||
void ScreenManager::switchScreen(Screen *screen) {
|
||||
// TODO: inputLock_ ?
|
||||
|
||||
if (!nextStack_.empty() && screen == nextStack_.front().screen) {
|
||||
ERROR_LOG(SYSTEM, "Already switching to this screen");
|
||||
return;
|
||||
|
||||
+5
-6
@@ -59,9 +59,9 @@ public:
|
||||
virtual void deviceLost() {}
|
||||
virtual void deviceRestored() {}
|
||||
|
||||
virtual void UnsyncTouch(const TouchInput &touch) {}
|
||||
virtual bool UnsyncKey(const KeyInput &touch) { return false; }
|
||||
virtual void UnsyncAxis(const AxisInput &touch) {}
|
||||
virtual void UnsyncTouch(const TouchInput &touch) = 0;
|
||||
virtual bool UnsyncKey(const KeyInput &touch) = 0;
|
||||
virtual void UnsyncAxis(const AxisInput &touch) = 0;
|
||||
|
||||
virtual void RecreateViews() {}
|
||||
|
||||
@@ -98,7 +98,6 @@ typedef void(*PostRenderCallback)(UIContext *ui, void *userdata);
|
||||
|
||||
class ScreenManager {
|
||||
public:
|
||||
ScreenManager();
|
||||
virtual ~ScreenManager();
|
||||
|
||||
void switchScreen(Screen *screen);
|
||||
@@ -154,8 +153,8 @@ private:
|
||||
void switchToNext();
|
||||
void processFinishDialog();
|
||||
|
||||
UIContext *uiContext_;
|
||||
Draw::DrawContext *thin3DContext_;
|
||||
UIContext *uiContext_ = nullptr;
|
||||
Draw::DrawContext *thin3DContext_ = nullptr;
|
||||
|
||||
PostRenderCallback postRenderCb_ = nullptr;
|
||||
void *postRenderUserdata_ = nullptr;
|
||||
|
||||
@@ -688,7 +688,7 @@ void TouchTestScreen::UpdateLogView() {
|
||||
bool TouchTestScreen::key(const KeyInput &key) {
|
||||
UIScreen::key(key);
|
||||
char buf[512];
|
||||
snprintf(buf, sizeof(buf), "Keycode: %d Device ID: %d [%s%s%s%s]", key.keyCode, key.deviceId,
|
||||
snprintf(buf, sizeof(buf), "%s (%d) Device ID: %d [%s%s%s%s]", KeyMap::GetKeyName(key.keyCode).c_str(), key.keyCode, key.deviceId,
|
||||
(key.flags & KEY_IS_REPEAT) ? "REP" : "",
|
||||
(key.flags & KEY_UP) ? "UP" : "",
|
||||
(key.flags & KEY_DOWN) ? "DOWN" : "",
|
||||
@@ -704,8 +704,8 @@ void TouchTestScreen::axis(const AxisInput &axis) {
|
||||
return;
|
||||
|
||||
char buf[512];
|
||||
snprintf(buf, sizeof(buf), "Axis: %d (value %1.3f) Device ID: %d",
|
||||
axis.axisId, axis.value, axis.deviceId);
|
||||
snprintf(buf, sizeof(buf), "Axis: %s (%d) (value %1.3f) Device ID: %d",
|
||||
KeyMap::GetAxisName(axis.axisId).c_str(), axis.axisId, axis.value, axis.deviceId);
|
||||
|
||||
keyEventLog_.push_back(buf);
|
||||
if (keyEventLog_.size() > 8) {
|
||||
|
||||
Reference in new issue
Block a user