Code: Select all
<option type="3" name="resolution" values="640x480@24;1024x768@24;1280x720@24;1280x800@24;1280x1024@24;1920x1080@24;">1920x1080@24</option>
Code: Select all
wchar_t* tmp = new wchar_t[len+1];
wcscpy(tmp, str2wchar_t(values));
printf("output: %S\n", tmp);
xml2->writeElement(L"option", false, L"type", L"3", L"name", str2wchar_t(descriptions[count].c_str()), L"values", str2wchar_t(values));
delete[] tmp;
The problem is, that writeElement() doesn't write anything in there for the attributes. This is the line it constructs:
Code: Select all
<option type="3" name="resolution" values="">1920x1080@24</option>
Can anyone help?
EDIT: I use Irrlicht 1.7.1 on OpenSuSE Linux 11.2 with a NVidia card (OpenGL 3.2).
EDIT2: This is the function str2wchar_t():
Code: Select all
const wchar_t *str2wchar_t(std::string str)
{
size_t needed = ::mbstowcs(NULL,&str[0],str.length());
wstring output;
output.resize(needed);
::mbstowcs(&output[0],&str[0],str.length());
const wchar_t *pout = output.c_str();
return pout;
}