mirror of
https://github.com/edubart/otclient.git
synced 2025-11-04 20:46:24 +01:00
Compiling for android but have some bugs
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
#include "win32window.h"
|
||||
WIN32Window window;
|
||||
#elif defined ANDROID
|
||||
#include "sdlplatform.h"
|
||||
SDLPlatform window;
|
||||
#include "sdlwindow.h"
|
||||
SDLWindow window;
|
||||
#else
|
||||
#include "x11window.h"
|
||||
#include <framework/core/clock.h>
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
#include "sdlplatform.h"
|
||||
|
||||
void SDLPlatform::init() {
|
||||
}
|
||||
|
||||
void SDLPlatform::terminate() {
|
||||
}
|
||||
|
||||
void SDLPlatform::move(const Point& pos) {
|
||||
}
|
||||
|
||||
void SDLPlatform::resize(const Size& size) {
|
||||
}
|
||||
|
||||
void SDLPlatform::show() {
|
||||
}
|
||||
|
||||
void SDLPlatform::hide() {
|
||||
}
|
||||
|
||||
void SDLPlatform::maximize() {
|
||||
}
|
||||
|
||||
void SDLPlatform::poll() {
|
||||
}
|
||||
|
||||
void SDLPlatform::swapBuffers() {
|
||||
}
|
||||
|
||||
void SDLPlatform::showMouse() {
|
||||
}
|
||||
|
||||
void SDLPlatform::hideMouse() {
|
||||
}
|
||||
|
||||
int SDLPlatform::internalLoadMouseCursor(const ImagePtr& image, const Point& hotSpot) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SDLPlatform::setMouseCursor(int cursorId) {
|
||||
}
|
||||
|
||||
void SDLPlatform::restoreMouseCursor() {
|
||||
}
|
||||
|
||||
void SDLPlatform::setTitle(const std::string& title) {
|
||||
}
|
||||
|
||||
void SDLPlatform::setMinimumSize(const Size& minimumSize) {
|
||||
}
|
||||
|
||||
void SDLPlatform::setFullscreen(bool fullscreen) {
|
||||
}
|
||||
|
||||
void SDLPlatform::setVerticalSync(bool enable) {
|
||||
}
|
||||
|
||||
void SDLPlatform::setIcon(const std::string& iconFile) {
|
||||
}
|
||||
|
||||
void SDLPlatform::setClipboardText(const std::string& text) {
|
||||
}
|
||||
|
||||
Size SDLPlatform::getDisplaySize() {
|
||||
Size TODO;
|
||||
return TODO;
|
||||
}
|
||||
|
||||
std::string SDLPlatform::getClipboardText() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::string SDLPlatform::getPlatformType() {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
#ifndef SDL_PLATFORM_H
|
||||
#define SDL_PLATFORM_H
|
||||
|
||||
#include "platformwindow.h"
|
||||
|
||||
class SDLPlatform : public PlatformWindow
|
||||
{
|
||||
public:
|
||||
void init();
|
||||
void terminate();
|
||||
|
||||
void move(const Point& pos);
|
||||
void resize(const Size& size);
|
||||
void show();
|
||||
void hide();
|
||||
void maximize();
|
||||
void poll();
|
||||
void swapBuffers();
|
||||
void showMouse();
|
||||
void hideMouse();
|
||||
|
||||
void setMouseCursor(int cursorId);
|
||||
void restoreMouseCursor();
|
||||
|
||||
void setTitle(const std::string& title);
|
||||
void setMinimumSize(const Size& minimumSize);
|
||||
void setFullscreen(bool fullscreen);
|
||||
void setVerticalSync(bool enable);
|
||||
void setIcon(const std::string& iconFile);
|
||||
void setClipboardText(const std::string& text);
|
||||
|
||||
Size getDisplaySize();
|
||||
std::string getClipboardText();
|
||||
std::string getPlatformType();
|
||||
protected:
|
||||
int internalLoadMouseCursor(const ImagePtr& image, const Point& hotSpot);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,12 @@
|
||||
#include "sdlwindow.h"
|
||||
|
||||
SDLWindow::SDLWindow() {
|
||||
m_window = 0;
|
||||
m_cursor = 0;
|
||||
m_minimumSize = Size(600,480);
|
||||
m_size = Size(600,480);
|
||||
}
|
||||
|
||||
void SDLWindow::init() {
|
||||
}
|
||||
|
||||
@@ -83,7 +90,7 @@ Size SDLWindow::getDisplaySize() {
|
||||
}
|
||||
|
||||
std::string SDLWindow::getClipboardText() {
|
||||
return nullptr;
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string SDLWindow::getPlatformType() {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#if !defined(WIN32) && defined(CRASH_HANDLER)
|
||||
#if !defined(WIN32) && !defined(ANDROID) && defined(CRASH_HANDLER)
|
||||
|
||||
#include "crashhandler.h"
|
||||
#include <framework/global.h>
|
||||
|
||||
@@ -29,7 +29,12 @@
|
||||
#include <framework/stdext/stdext.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <errno.h>
|
||||
#else
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
void Platform::processArgs(std::vector<std::string>& args)
|
||||
{
|
||||
@@ -169,6 +174,7 @@ std::string Platform::getOSName()
|
||||
return std::string();
|
||||
}
|
||||
|
||||
#ifndef ANDROID
|
||||
std::string Platform::traceback(const std::string& where, int level, int maxDepth)
|
||||
{
|
||||
std::stringstream ss;
|
||||
@@ -199,5 +205,8 @@ std::string Platform::traceback(const std::string& where, int level, int maxDept
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
#else
|
||||
std::string Platform::traceback(const std::string& where, int level, int maxDepth){ return "TODO"; }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user