use of ru.playsoftware.j2meloader.config.ShaderInfo in project J2ME-Loader by nikita36078.
the class MicroLoader method applyConfiguration.
void applyConfiguration() {
try {
// Apply configuration to the launching MIDlet
if (params.showKeyboard) {
ContextHolder.setVk(new VirtualKeyboard(params));
} else {
ContextHolder.setVk(null);
}
setProperties();
final String[] propLines = params.systemProperties.split("\n");
for (String line : propLines) {
String[] prop = line.split(":[ ]*", 2);
if (prop.length == 2) {
System.setProperty(prop[0], prop[1]);
MidletSystem.setProperty(prop[0], prop[1]);
}
}
try {
Charset.forName(System.getProperty("microedition.encoding"));
} catch (Exception e) {
System.setProperty("microedition.encoding", "ISO-8859-1");
MidletSystem.setProperty("microedition.encoding", "ISO-8859-1");
}
int screenWidth = params.screenWidth;
int screenHeight = params.screenHeight;
Displayable.setVirtualSize(screenWidth, screenHeight);
Canvas.setBackgroundColor(params.screenBackgroundColor);
Canvas.setScale(params.screenGravity, params.screenScaleType, params.screenScaleRatio);
Canvas.setFilterBitmap(params.screenFilter);
EventQueue.setImmediate(params.immediateMode);
Canvas.setGraphicsMode(params.graphicsMode, params.parallelRedrawScreen);
ShaderInfo shader = params.shader;
if (shader != null) {
shader.dir = workDir + Config.SHADERS_DIR;
}
Canvas.setShaderFilter(shader);
Canvas.setForceFullscreen(params.forceFullscreen);
Canvas.setShowFps(params.showFps);
Canvas.setLimitFps(params.fpsLimit);
Font.applySettings(params);
KeyMapper.setKeyMapping(params);
Canvas.setHasTouchInput(params.touchInput);
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations