diff options
-rw-r--r-- | Makefile.android | 7 | ||||
-rw-r--r-- | android/avd/hardware-properties.ini | 2 | ||||
-rw-r--r-- | android/avd/info.c | 2 | ||||
-rw-r--r-- | android/camera/camera-service.c | 6 | ||||
-rw-r--r-- | android/hw-pipe-net.c | 2 | ||||
-rw-r--r-- | android/main-common.c | 15 | ||||
-rw-r--r-- | android/main.c | 14 | ||||
-rw-r--r-- | audio/winaudio.c | 4 |
8 files changed, 37 insertions, 15 deletions
diff --git a/Makefile.android b/Makefile.android index d638640..184179e 100644 --- a/Makefile.android +++ b/Makefile.android @@ -192,9 +192,10 @@ endif ifeq ($(HOST_OS),darwin) QEMU_SYSTEM_LDLIBS += -Wl,-framework,Cocoa,-framework,QTKit,-framework,CoreVideo ifneq ($(filter 10.7 10.7.%,$(DARWIN_VERSION)),) - # Lion needs to be forced to link dylib to avoid problems - # with the dynamic function lookups in SDL 1.2 - QEMU_SYSTEM_LDLIBS += /usr/lib/dylib1.o + # Lion/XCode4 needs to be explicitly told the dynamic library + # lookup symbols in the precompiled libSDL are resolved at + # runtime + QEMU_SYSTEM_LDLIBS += -undefined dynamic_lookup endif endif diff --git a/android/avd/hardware-properties.ini b/android/avd/hardware-properties.ini index 83a9300..ebf2450 100644 --- a/android/avd/hardware-properties.ini +++ b/android/avd/hardware-properties.ini @@ -117,7 +117,7 @@ description = Whether there is a GSM modem in the device. # Camera support name = hw.camera type = boolean -default = no +default = yes abstract = Camera support description = Whether the device has a camera. diff --git a/android/avd/info.c b/android/avd/info.c index 815b0b4..7fd8cc4 100644 --- a/android/avd/info.c +++ b/android/avd/info.c @@ -898,7 +898,7 @@ avdInfo_getKernelPath( AvdInfo* i ) } AFREE(abi); - p = bufprint(temp, end, "%s/prebuilt/android-%s/kernel/kernel-qemu%s", + p = bufprint(temp, end, "%s/prebuilts/qemu-kernel/%s/kernel-qemu%s", i->androidBuildRoot, i->targetArch, suffix); if (p >= end || !path_exists(temp)) { derror("bad workspace: cannot find prebuilt kernel in: %s", temp); diff --git a/android/camera/camera-service.c b/android/camera/camera-service.c index 8f0e2ec..69b9524 100644 --- a/android/camera/camera-service.c +++ b/android/camera/camera-service.c @@ -438,6 +438,12 @@ _camera_service_init(CameraServiceDesc* csd) memset(ci, 0, sizeof(CameraInfo) * MAX_CAMERA); memset(csd->camera_info, 0, sizeof(CameraInfo) * MAX_CAMERA); csd->camera_count = 0; + + if (android_hw->hw_camera == 0) { + /* Camera emulation is disabled. Skip enumeration of webcameras. */ + return; + } + connected_cnt = enumerate_camera_devices(ci, MAX_CAMERA); if (connected_cnt <= 0) { /* Nothing is connected - nothing to emulate. */ diff --git a/android/hw-pipe-net.c b/android/hw-pipe-net.c index c2a7e9e..5a25401 100644 --- a/android/hw-pipe-net.c +++ b/android/hw-pipe-net.c @@ -30,7 +30,7 @@ /* Implement the OpenGL fast-pipe */ /* Set to 1 or 2 for debug traces */ -#define DEBUG 1 +// #define DEBUG 1 #if DEBUG >= 1 # define D(...) printf(__VA_ARGS__), printf("\n") diff --git a/android/main-common.c b/android/main-common.c index a662907..04d200a 100644 --- a/android/main-common.c +++ b/android/main-common.c @@ -806,12 +806,15 @@ AvdInfo* createAVD(AndroidOptions* opts, int* inAndroidBuild) exit(2); } - android_build_root = path_parent( out, 4 ); - if (android_build_root == NULL || !path_exists(android_build_root)) { - derror("Can't find the Android build root from '%s'\n" - "Please check the definition of the ANDROID_PRODUCT_OUT variable.\n" - "It should point to your product-specific build output directory.\n", - out ); + android_build_root = getenv("ANDROID_BUILD_TOP"); + if (android_build_root == NULL || android_build_root[0] == 0) + break; + + if (!path_exists(android_build_root)) { + derror("Can't find the Android build root '%s'\n" + "Please check the definition of the ANDROID_BUILD_TOP variable.\n" + "It should point to the root of your source tree.\n", + android_build_root ); exit(2); } android_build_out = out; diff --git a/android/main.c b/android/main.c index 56ae698..1adb6a1 100644 --- a/android/main.c +++ b/android/main.c @@ -1168,9 +1168,9 @@ int main(int argc, char **argv) } } + int webcam_num = 0; if (opts->webcam != NULL) { ParamList* pl = opts->webcam; - int webcam_num = 0; for ( ; pl != NULL; pl = pl->next ) { char webcam_name[64]; char webcam_dir[16]; @@ -1229,6 +1229,18 @@ int main(int argc, char **argv) hw->hw_webcam_count = webcam_num; } + /* Command line options related to webcam, and fake camera should + * override camera emulation flag, set in AVD. */ + if (hw->hw_camera == 0) { + /* Camera emulation is disabled in AVD. Lets see if command line enables + * webcam, or fake camera emulation. */ + if (webcam_num != 0 || + (opts->fake_camera && strcmp(hw->hw_fakeCamera, "off") != 0)) { + /* Command line parameters enable camera emulation. */ + hw->hw_camera = 1; + } + } + /* physical memory is now in hw->hw_ramSize */ hw->avd_name = ASTRDUP(avdInfo_getName(avd)); diff --git a/audio/winaudio.c b/audio/winaudio.c index 75f6af2..5c2c6b9 100644 --- a/audio/winaudio.c +++ b/audio/winaudio.c @@ -381,7 +381,7 @@ winaudio_in_fini (HWVoiceIn *hw) s->wavein = 0;
}
- for ( i=0; i<NUM_OUT_BUFFERS; ++i ) {
+ for ( i=0; i<NUM_IN_BUFFERS; ++i ) {
if ( s->buffers[i].dwUser != 0xFFFF ) {
waveInUnprepareHeader(
s->wavein, &s->buffers[i], sizeof(s->buffers[i]) );
@@ -411,7 +411,7 @@ winaudio_in_init (HWVoiceIn *hw, struct audsettings *as) s->wavein = NULL;
InitializeCriticalSection( &s->lock );
- for (i = 0; i < NUM_OUT_BUFFERS; i++) {
+ for (i = 0; i < NUM_IN_BUFFERS; i++) {
s->buffers[i].dwUser = 0xFFFF;
}
s->buffer_bytes = NULL;
|