X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Fmod_mng%2Ftrgt_mng.cpp;h=ad988384969e73e6d68e150fbc46141a9ab44c07;hb=2f015c519aa92f29144873527c109c21c171c6a7;hp=8b44ad5efb773e91bda942d901123f3ea1822e6d;hpb=ba24cb7df04d015c3e3ecd0c4b234f64646a3618;p=synfig.git diff --git a/synfig-core/trunk/src/modules/mod_mng/trgt_mng.cpp b/synfig-core/trunk/src/modules/mod_mng/trgt_mng.cpp index 8b44ad5..ad98838 100644 --- a/synfig-core/trunk/src/modules/mod_mng/trgt_mng.cpp +++ b/synfig-core/trunk/src/modules/mod_mng/trgt_mng.cpp @@ -180,10 +180,23 @@ mng_trgt::init() if (mng_create(mng) != 0) goto cleanup_on_error; if (mng_putchunk_mhdr(mng, w, h, frame_rate, num_layers, num_frames, play_time, MNG_SIMPLICITY_VALID|MNG_SIMPLICITY_SIMPLEFEATURES) != 0) goto cleanup_on_error; if (mng_putchunk_term(mng, MNG_TERMACTION_REPEAT, MNG_ITERACTION_LASTFRAME, 0, 0x7fffffff) != 0) goto cleanup_on_error; - if (mng_putchunk_text(mng, sizeof(MNG_TEXT_TITLE), MNG_TEXT_TITLE, get_canvas()->get_name().length(), const_cast(get_canvas()->get_name().c_str())) != 0) goto cleanup_on_error; - if (mng_putchunk_text(mng, sizeof(MNG_TEXT_DESCRIPTION), MNG_TEXT_DESCRIPTION, get_canvas()->get_description().length(), const_cast(get_canvas()->get_description().c_str())) != 0) goto cleanup_on_error; - if (mng_putchunk_text(mng, sizeof(MNG_TEXT_SOFTWARE), MNG_TEXT_SOFTWARE, sizeof("SYNFIG"), "SYNFIG") != 0) goto cleanup_on_error; - if (mng_putchunk_gama(mng, MNG_FALSE, (int)(1.0/gamma().get_gamma()*100000)) != 0) goto cleanup_on_error; + { + char title[] = MNG_TEXT_TITLE; + if (mng_putchunk_text(mng, sizeof(title), title, + get_canvas()->get_name().length(), const_cast(get_canvas()->get_name().c_str())) != 0) + goto cleanup_on_error; + + char description[] = MNG_TEXT_DESCRIPTION; + if (mng_putchunk_text(mng, sizeof(description), description, + get_canvas()->get_description().length(), const_cast(get_canvas()->get_description().c_str())) != 0) + goto cleanup_on_error; + + char software[] = MNG_TEXT_SOFTWARE; char synfig[] = "SYNFIG"; + if (mng_putchunk_text(mng, sizeof(software), software, + sizeof(synfig), synfig) != 0) + goto cleanup_on_error; + } + if (mng_putchunk_gama(mng, MNG_FALSE, (int)(gamma().get_gamma()*100000)) != 0) goto cleanup_on_error; if (mng_putchunk_phys(mng, MNG_FALSE, round_to_int(desc.get_x_res()),round_to_int(desc.get_y_res()), MNG_UNIT_METER) != 0) goto cleanup_on_error; if (mng_putchunk_time(mng, gmt->tm_year + 1900, gmt->tm_mon + 1, gmt->tm_mday, gmt->tm_hour, gmt->tm_min, gmt->tm_sec) != 0) goto cleanup_on_error; buffer=new unsigned char[(4*w)+1];