← Back to team overview

hugin-devs team mailing list archive

Re: [Bug 761231] Re: Image cache memory can't be set above 2047MB

 

On May 9, 2011 10:53:22 PM Matthew Petroff wrote:
> incompatibility
> between how Hugin saves this setting and the Windows registry.

how about using two 32bit DWORDs?

for backward compatibility, the existing DWORD saves the lower 32 bit and the 
new DWORD would save the higher 32 bit.

On read:
- read legacy DWORD.
- try to read the new DWORD.
- If not existing, set to zero.
- Shift 32 bits.
- Add the two.
- apply the value.

On write:
- decompose the 64 bit value into high 32 and low 32
- write high 32 to new DWORD and low 32 to legacy DWORD

And a path to the future:  when a newer version of wxWidgets that supports 
QWORD becomes widely available, the legacy DWORD can be silenty upgraded to a 
QWORD and the (temporary) new DWORD can be deleted / ignored.

I've added this quickly to default but I do not have Windows and can't test if 
it builds nor if it makes sense.  Please check

http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/rev/085b637a788d

Yuv

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/761231

Title:
  Image cache memory can't be set above 2047MB

Status in Hugin - Panorama Tools GUI:
  Confirmed

Bug description:
  
  When setting the image cache memory (file/preferences/general) to any value above 2047MB it resets to 1MB.

  If I then click cancel, it does not stay at 2047, but goes ahead and
  sets the cache to 1MB.

  Windows 7 64 bit, AMD Phenom II 6 core  1100T, 8GB RAM
  Hugin 2011.0.0.8f1447ab8649


References