fixes for mobile

This commit is contained in:
Zeno Rogue 2019-02-08 16:52:44 +01:00
parent 13c60727cd
commit f546bba84a
6 changed files with 20 additions and 1 deletions

View File

@ -669,6 +669,7 @@ namespace conformal {
dialog::init(XLAT("models of hyperbolic geometry"));
for(int i=0; i<mdGUARD; i++) {
eModel m = eModel(i);
if(m == mdFormula && ISMOBILE) continue;
if(model_available(m)) {
dialog::addBoolItem(get_model_name(m), pmodel == m, "0123456789!@#$%^&*()" [m]);
dialog::add_action([m] () {

View File

@ -625,8 +625,11 @@ void showEuclideanMenu() {
dialog::addBreak(50);
#if CAP_SHOT
dialog::addItem(XLAT("take picture"), 's');
dialog::add_action([] { pushScreen(shot::menu); });
#endif
dialog::addHelp();
dialog::addBack();

View File

@ -7,7 +7,9 @@
#define VERNUM_HEX 0xA505
#include <stdarg.h>
#if !ISSTEAM
#include "hyper_function.h"
#endif
namespace hr {
@ -16,7 +18,11 @@ void ignore(T&&) {
// placate GCC's overzealous -Wunused-result
}
#if USE_STDFUNCTION
using std::function;
#else
template<class Sig> using function = hyper_function<Sig>;
#endif
// functions and types used from the standard library
using std::vector;

View File

@ -1495,7 +1495,8 @@ namespace patterns {
dialog::addSelItem(XLAT("sides"), "sides", 'B');
dialog::addSelItem(XLAT("formula"), "formula", 'f');
if(!ISMOBILE)
dialog::addSelItem(XLAT("formula"), "formula", 'f');
dialog::addBreak(100);
dialog::addBoolItem(XLATN(winf[waInvisibleFloor].name), canvas_invisible, 'i');

View File

@ -767,10 +767,14 @@ void fixMercator(bool tinf) {
unsigned char& part(color_t& col, int i) {
unsigned char* c = (unsigned char*) &col;
#if ISMOBILE
return c[i];
#else
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
return c[sizeof(col) - 1 - i];
#else
return c[i];
#endif
#endif
}

View File

@ -17,6 +17,10 @@
#define NOLICENSE
#endif
#ifndef USE_STDFUNCTION
#define USE_STDFUNCTION ISSTEAM
#endif
#ifndef CAP_SHADER
#define CAP_SHADER CAP_GL
#endif