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:
parent
f57ab0dee5
commit
3b6a5230b2
2 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue