more changes to work on ARM

This commit is contained in:
Eduardo Bart
2011-12-30 02:50:19 -02:00
parent a394033872
commit e95973174c
12 changed files with 33 additions and 23 deletions

View File

@@ -54,6 +54,7 @@ public:
virtual Size getDisplaySize() = 0;
virtual std::string getClipboardText() = 0;
virtual std::string getPlatformType() = 0;
int getDisplayWidth() { return getDisplaySize().width(); }
int getDisplayHeight() { return getDisplaySize().width(); }

View File

@@ -53,6 +53,7 @@ void crashHandler(int signum, siginfo_t* info, void* secret)
ss << " ebp = " << context.uc_mcontext.gregs[REG_EBP] << std::endl;
ss << " esp = " << context.uc_mcontext.gregs[REG_ESP] << std::endl;
ss << " efl = " << context.uc_mcontext.gregs[REG_EFL] << std::endl;
ss << std::endl;
#elif __WORDSIZE == 64
ss << " at rip = " << context.uc_mcontext.gregs[REG_RIP] << std::endl;
ss << " rax = " << context.uc_mcontext.gregs[REG_RAX] << std::endl;
@@ -64,8 +65,8 @@ void crashHandler(int signum, siginfo_t* info, void* secret)
ss << " rbp = " << context.uc_mcontext.gregs[REG_RBP] << std::endl;
ss << " rsp = " << context.uc_mcontext.gregs[REG_RSP] << std::endl;
ss << " efl = " << context.uc_mcontext.gregs[REG_EFL] << std::endl;
#endif
ss << std::endl;
#endif
ss.flags(std::ios::dec);
ss << " backtrace:" << std::endl;

View File

@@ -610,3 +610,8 @@ std::string WIN32Window::getClipboardText()
return text;
}
std::string WIN32Window::getPlatformType()
{
return "WIN32-WGL";
}

View File

@@ -68,6 +68,7 @@ public:
Size getDisplaySize();
std::string getClipboardText();
std::string getPlatformType();
bool isMaximized() { return m_maximized; }

View File

@@ -904,6 +904,15 @@ std::string X11Window::getClipboardText()
return clipboardText;
}
std::string X11Window::getPlatformType()
{
#ifndef OPENGL_ES2
return "X11-GLX";
#else
return "X11-EGL";
#endif
}
bool X11Window::isMaximized()
{
Atom wmState = XInternAtom(m_display, "_NET_WM_STATE", False);

View File

@@ -75,6 +75,7 @@ public:
Size getDisplaySize();
std::string getClipboardText();
std::string getPlatformType();
bool isMaximized();