改动如下:
if CONFIG_SCREEN_AUTOSCALE and CONFIG_SCREEN_AUTOSCALE ~="NONE" then
if type(CONFIG_SCREEN_AUTOSCALE_CALLBACK) == "function" then
scaleX, scaleY = CONFIG_SCREEN_AUTOSCALE_CALLBACK(w, h, device.model)
end
- if CONFIG_SCREEN_AUTOSCALE == "FILL_ALL" then
+ if CONFIG_SCREEN_AUTOSCALE == "EXACT_FIT" then
+ scale = 1.0
+ glview:setDesignResolutionSize(CONFIG_SCREEN_WIDTH, CONFIG_SCREEN_HEIGHT, cc.ResolutionPolicy.EXACT_FIT)
+ elseif CONFIG_SCREEN_AUTOSCALE == "FILL_ALL" then
CONFIG_SCREEN_WIDTH = w
CONFIG_SCREEN_HEIGHT = h
scale = 1.0
if cc.bPlugin_ then
glview:setDesignResolutionSize(CONFIG_SCREEN_WIDTH, CONFIG_SCREEN_HEIGHT, cc.ResolutionPolicy.NO_BORDER)
else
- glview:setDesignResolutionSize(CONFIG_SCREEN_WIDTH, CONFIG_SCREEN_HEIGHT, cc.ResolutionPolicy.FILL_ALL)
+ glview:setDesignResolutionSize(CONFIG_SCREEN_WIDTH, CONFIG_SCREEN_HEIGHT, cc.ResolutionPolicy.SHOW_ALL)
end