aboutsummaryrefslogtreecommitdiffstats
path: root/android/hw-pipe-net.c
diff options
context:
space:
mode:
Diffstat (limited to 'android/hw-pipe-net.c')
-rw-r--r--android/hw-pipe-net.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/android/hw-pipe-net.c b/android/hw-pipe-net.c
index 8b8017d..193d60b 100644
--- a/android/hw-pipe-net.c
+++ b/android/hw-pipe-net.c
@@ -474,10 +474,21 @@ openglesPipe_init( void* hwpipe, void* _looper, const char* args )
return NULL;
}
- /* For now, simply connect through tcp */
- snprintf(temp, sizeof temp, "%d", ANDROID_OPENGLES_BASE_PORT);
- pipe = (NetPipe *)netPipe_initTcp(hwpipe, _looper, temp);
-
+#ifndef _WIN32
+ if (android_gles_fast_pipes) {
+ char unix_path[PATH_MAX];
+ android_gles_unix_path(unix_path, sizeof(unix_path), ANDROID_OPENGLES_BASE_PORT);
+ pipe = (NetPipe *)netPipe_initUnix(hwpipe, _looper, unix_path);
+ D("Creating Unix OpenGLES pipe for GPU emulation: %s", unix_path);
+ } else {
+#else /* _WIN32 */
+ {
+#endif
+ /* Connect through TCP as a fallback */
+ snprintf(temp, sizeof temp, "%d", ANDROID_OPENGLES_BASE_PORT);
+ pipe = (NetPipe *)netPipe_initTcp(hwpipe, _looper, temp);
+ D("Creating TCP OpenGLES pipe for GPU emulation!");
+ }
if (pipe != NULL) {
// Disable TCP nagle algorithm to improve throughput of small packets
socket_set_nodelay(pipe->io->fd);