OSDN Git Service

ui/cocoa.m: add Speed menu
authorJohn Arbuckle <programmingkidx@gmail.com>
Wed, 14 Jun 2017 03:17:38 +0000 (23:17 -0400)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 23 Jun 2017 14:02:40 +0000 (15:02 +0100)
commite47ec1a9ba1cd239e66733fd8d55dfa3261a9de6
tree1cbfc42406c0433a9d96bdb3d00d35ea270072c8
parent40b06f523070deb55f87f9bcee4fedb6c69942f9
ui/cocoa.m: add Speed menu

Programs running inside of QEMU can sometimes use more CPU time than is really
needed. To solve this problem, we just need to throttle the virtual CPU. This
feature will stop laptops from burning up.

This patch adds a menu called Speed that has menu items from 100% to 1% that
represent the speed options. 100% is full speed and 1% is slowest.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
Message-id: D6FAAABF-064D-49C0-B572-C73679F34052@gmail.com
[PMM: Moved "mark 100% menu item as checked initially" code to
 after menu item is allocated, not before it]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
ui/cocoa.m