Don't initialize coreversion and projectid in moviefile ctor

It turns out that global ctor runs default ctor for moviefile, and
those two fields can't be initialized in that context. Fixes the
instant crash on wine.
This commit is contained in:
Ilari Liusvaara 2011-09-21 15:47:10 +03:00
parent f57ab0dee5
commit 3b6a5230b2
2 changed files with 4 additions and 2 deletions

View file

@ -205,8 +205,8 @@ moviefile::moviefile() throw(std::bad_alloc)
gametype = GT_INVALID;
port1 = PT_GAMEPAD;
port2 = PT_NONE;
coreversion = bsnes_core_version;
projectid = get_random_hexstring(40);
coreversion = "";
projectid = "";
rerecords = "0";
is_savestate = false;
}

View file

@ -29,6 +29,8 @@ class my_interfaced : public SNES::Interface
struct moviefile generate_movie_template(std::vector<std::string> cmdline, loaded_rom& r)
{
struct moviefile movie;
movie.coreversion = bsnes_core_version;
movie.projectid = get_random_hexstring(40);
movie.gametype = gtype::togametype(r.rtype, r.region);
movie.rom_sha256 = r.rom.sha256;
movie.romxml_sha256 = r.rom_xml.sha256;