Skip to content

Commit

Permalink
ios fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
armadillu committed Jul 14, 2016
1 parent f96f4ca commit f48ebc3
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 44 deletions.
13 changes: 0 additions & 13 deletions src/TinyPie.h

This file was deleted.

Empty file modified src/dirent_vs.h 100755 → 100644
Empty file.
Empty file modified src/ofxRemoteUIClient.h 100755 → 100644
Empty file.
Empty file modified src/ofxRemoteUINeigbors.cpp 100755 → 100644
Empty file.
Empty file modified src/ofxRemoteUINeigbors.h 100755 → 100644
Empty file.
60 changes: 29 additions & 31 deletions src/ofxRemoteUIServer.cpp
Expand Up @@ -35,7 +35,9 @@
#include <Poco/Process.h>
#include <Poco/Util/Application.h>
using Poco::Util::Application;
#include "ofAppNoWindow.h"
#ifndef TARGET_OF_IOS
#include "ofAppNoWindow.h"
#endif

#endif

Expand Down Expand Up @@ -845,11 +847,13 @@ void ofxRemoteUIServer::setup(int port_, float updateInterval_){
d.create(true);
}

#ifndef TARGET_OF_IOS
const ofAppNoWindow * win = dynamic_cast<const ofAppNoWindow*>(ofGetWindowPtr());
if(win){
RLOG_NOTICE << "Running Headless mode!";
headlessMode = true;
}
#endif
#else
#if defined(_WIN32)
_mkdir(getFinalPath(OFXREMOTEUI_PRESET_DIR));
Expand Down Expand Up @@ -1199,24 +1203,29 @@ bool ofxRemoteUIServer::_keyPressed(ofKeyEventArgs &e){
}

if(e.key == showInterfaceKey){
if (uiAlpha < 1.0 && showUI){
uiAlpha = 1.0;
showUI = false;
}else{
showUI = !showUI;
}

if (showUI){
uiAlpha = 1;
uiLines.clear();
syncAllPointersToParams();
refreshPresetsCache();
}
toggleBuiltInClientUI();
}
return showUI && e.key != OF_KEY_ESC;
}


void ofxRemoteUIServer::toggleBuiltInClientUI(){
if (uiAlpha < 1.0 && showUI){
uiAlpha = 1.0;
showUI = false;
}else{
showUI = !showUI;
}

if (showUI){
uiAlpha = 1;
uiLines.clear();
syncAllPointersToParams();
refreshPresetsCache();
}
}


void ofxRemoteUIServer::refreshPresetsCache(){

//get all group presets
Expand Down Expand Up @@ -1625,24 +1634,13 @@ void ofxRemoteUIServer::handleBroadcast(){
Poco::Environment e;
computerName = e.nodeName();
#endif
char pathbuf[2048];
uint32_t bufsize = sizeof(pathbuf);
#ifdef TARGET_OSX
_NSGetExecutablePath(pathbuf, &bufsize);
#else
#ifdef _WIN32
GetModuleFileNameA( NULL, pathbuf, bufsize ); //no idea why, but GetModuleFileName() is not defined?
#else

char procname[1024];
int len = readlink("/proc/self/exe", procname, 1024-1);
if (len > 0){
procname[len] = '\0';
}
#endif

binaryName = ofFilePath::getBaseName(ofFilePath::getCurrentExePath());

#ifdef TARGET_OF_IOS
binaryName = "iOS App";
#endif
binaryName = ofFilePath::getBaseName(pathbuf);
#else
#else
binaryName = "Unknown";
#endif
}
Expand Down
2 changes: 2 additions & 0 deletions src/ofxRemoteUIServer.h
Expand Up @@ -132,6 +132,8 @@ class ofxRemoteUIServer: public ofxRemoteUI

#ifdef OF_AVAILABLE


void toggleBuiltInClientUI(); //show hide the "built in client" GUI screen
void setUiColumnWidth(int w);
void setBuiltInUiScale(float s);
void setCustomScreenHeight(int h);
Expand Down
Empty file modified src/uriencode.cpp 100755 → 100644
Empty file.
Empty file modified src/uriencode.h 100755 → 100644
Empty file.

0 comments on commit f48ebc3

Please sign in to comment.