diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2012-02-10 08:29:22 -0800 |
---|---|---|
committer | Vladimir Chtchetkine <vchtchetkine@google.com> | 2012-02-10 14:48:43 -0800 |
commit | 9242b33d3545e6632d21c1f416794a9f5d385c45 (patch) | |
tree | 2fc6bbbb8767da61b11c2ffc6ee6ff371490da7b /android/main.c | |
parent | 05e074899c900b99adca7b37eee19a4ddc090e38 (diff) | |
download | external_qemu-9242b33d3545e6632d21c1f416794a9f5d385c45.zip external_qemu-9242b33d3545e6632d21c1f416794a9f5d385c45.tar.gz external_qemu-9242b33d3545e6632d21c1f416794a9f5d385c45.tar.bz2 |
Stop emulator when both, gpu and snapshots are on.
This is a temporary solution fixing emulator crash due to the difficulties in
implementing GPU state save to and reload from snapshot.
Change-Id: Id62830d3447538472d3c7a83ade97f4f09dfaa06
Diffstat (limited to 'android/main.c')
-rw-r--r-- | android/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/android/main.c b/android/main.c index c56bb5c..b7421a1 100644 --- a/android/main.c +++ b/android/main.c @@ -1155,6 +1155,15 @@ int main(int argc, char **argv) } } + /* Quit emulator on condition that both, gpu and snapstorage are on. This is + * a temporary solution preventing the emulator from crashing until GPU state + * can be properly saved / resored in snapshot file. */ + if (hw->hw_gpu_enabled && opts->snapstorage && (!opts->no_snapshot_load || + !opts->no_snapshot_save)) { + derror("Snapshots and gpu are mutually exclusive at this point. Please turn one of them off, and restart the emulator."); + exit(1); + } + if (opts->fake_camera) { if (!strcmp(opts->fake_camera, "back") || !strcmp(opts->fake_camera, "front") || |