Coder Social home page Coder Social logo

Params -Xxx AND -yXX not work about urho3d HOT 4 CLOSED

urho3d avatar urho3d commented on May 4, 2024
Params -Xxx AND -yXX not work

from urho3d.

Comments (4)

weitjong avatar weitjong commented on May 4, 2024

It used to be without a space in between the parameter key and parameter value. It has been changed since then and a space is required. -x XX -y XX

from urho3d.

CarloMaker avatar CarloMaker commented on May 4, 2024

Sorry , but i have same problem, i also used a small unit test that i attach here,
i tried also with "x 1280":

QT_TEST(TEST_LAUNCH){
Vector videoSettings;
videoSettings.Push("-x1280");
videoSettings.Push("-y960");
videoSettings.Push("-w");
videoSettings.Push("-nosound");
videoSettings.Push("-nolimit");
String VERSIONE= "v 0.2";
VariantMap engineParameters = Engine::ParseParameters(videoSettings);
QT_CHECK_EQUAL(Engine::GetParameter(engineParameters,"WindowWidth").GetInt(),1280) ; //FAIL

}

from urho3d.

cadaver avatar cadaver commented on May 4, 2024

Using faked command line arguments is a bad way to configure the engine. Use Engine::ParseParameters() to get the defaults, then modify the parameter map directly after that.

If you insist on using the method above, you must understand the way command line argument parsing works. Everything separated by a space gets stored as a separate argument, so now you must do

videoSettings.Push("-x");
videoSettings.Push("1280");

etc.

from urho3d.

CarloMaker avatar CarloMaker commented on May 4, 2024

ok thanks!

from urho3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.