Commit 4d9ad757 authored by Gerhard Stein's avatar Gerhard Stein

Cleanups for Android inputs in menu do not create any troubles

parent 40b47e49
......@@ -51,7 +51,7 @@ bool CSettings::saveDrvCfg()
Configuration.WriteInt("Video", "width", VidConf.m_DisplayRect.w);
Configuration.WriteInt("Video", "height", VidConf.m_DisplayRect.h);
Configuration.WriteInt("Video", "scale", VidConf.Zoom);
#if defined(USE_OPENGL) && !defined(ANDROID)
#if defined(USE_OPENGL)
if(VidConf.m_opengl)
Configuration.WriteString("Video", "OGLfilter", VidConf.m_opengl_filter == GL_NEAREST ? "nearest" : "linear" );
#endif
......@@ -117,7 +117,7 @@ bool CSettings::loadDrvCfg()
VidConf.m_ScaleXFilter = value;
Configuration.ReadKeyword("Video", "OpenGL", &VidConf.m_opengl, false);
#if defined(USE_OPENGL) && !defined(ANDROID)
#if defined(USE_OPENGL)
if(VidConf.m_opengl)
{
std::string oglFilter;
......@@ -165,7 +165,7 @@ void CSettings::loadDefaultGraphicsCfg() //Loads default graphics
g_pVideoDriver->setMode(320,200,32);
g_pVideoDriver->isFullscreen(false);
#if defined(USE_OPENGL) && !defined(ANDROID)
#if defined(USE_OPENGL)
g_pVideoDriver->enableOpenGL(false);
g_pVideoDriver->setOGLFilter(GL_LINEAR);
#endif
......
......@@ -105,7 +105,7 @@ bool CAudioGalaxy::LoadFromAudioCK(const CExeFile& ExeFile)
#endif
uint32_t *audiohedptr = (uint32_t*) (void*) ExeFile.getHeaderData();
bool found = false;
for( const uint32_t *endptr = (uint32_t*) (void*) ExeFile.getHeaderData()+ExeFile.getExeDataSize()/sizeof(uint32_t);
for( const uint32_t *endptr = (uint32_t*) (void*) ExeFile.getHeaderData() + ExeFile.getExeDataSize()/sizeof(uint32_t);
audiohedptr < endptr ;
audiohedptr++ )
{
......
......@@ -343,16 +343,17 @@ bool CExeFile::readExeImageSize(unsigned char *p_data_start, unsigned long *imgl
return false;
}
unsigned char* CExeFile::getRawData() const
byte* CExeFile::getRawData() const
{ return m_rawdata; }
unsigned char* CExeFile::getHeaderData() const
byte* CExeFile::getHeaderData() const
{ return m_headerdata; }
unsigned char* CExeFile::getDSegPtr() const
byte* CExeFile::getDSegPtr() const
{ return m_data_segment; }
CExeFile::~CExeFile() {
CExeFile::~CExeFile()
{
SAFE_DELETE_ARRAY(m_data);
}
......@@ -40,9 +40,9 @@ public:
int getEXECrc();
bool readExeImageSize(unsigned char *p_data_start, unsigned long *imglen, unsigned long *headerlen) const;
unsigned char* getRawData() const;
unsigned char* getHeaderData() const;
unsigned char* getDSegPtr() const;
byte* getRawData() const;
byte* getHeaderData() const;
byte* getDSegPtr() const;
~CExeFile();
......@@ -70,10 +70,10 @@ private:
size_t m_headersize;
int m_episode;
unsigned int m_crc;
unsigned char *m_data;
unsigned char *m_headerdata;
unsigned char *m_rawdata;
unsigned char *m_data_segment;
byte *m_data;
byte *m_headerdata;
byte *m_rawdata;
byte *m_data_segment;
std::string m_datadirectory;
std::string m_filename;
......
......@@ -136,16 +136,6 @@ void CInput::resetControls(int player)
InputCommand[i][IC_BACK].joybutton = 6;
InputCommand[i][IC_BACK].which = 0;
#ifdef ANDROID
// Joystick input is broken in main menu and dialogs, so disabled for now
/*
InputCommand[i][IC_LEFT].joyeventtype = ETYPE_JOYAXIS;
InputCommand[i][IC_RIGHT].joyeventtype = ETYPE_JOYAXIS;
InputCommand[i][IC_UP].joyeventtype = ETYPE_JOYAXIS;
InputCommand[i][IC_DOWN].joyeventtype = ETYPE_JOYAXIS;
*/
#endif
setTwoButtonFiring(i, false);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment