mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed the issue that the image cannot be loaded from disk in IMAGE meter.
For instance: MeterImage2 fails loading the image. ----- [CALC] Measure=CALC Formula=1 [MeterImage] Meter=IMAGE X=0r Y=0R ImageName=Image.png ImageTint=255,255,255,64 [MeterHistogram] Meter=HISTOGRAM MeasureName=CALC X=0r Y=0r PrimaryImage=Image.png [MeterImage2] Meter=IMAGE MeterStyle=MeterImage [MeterHistogram2] Meter=HISTOGRAM MeterStyle=MeterHistogram -----
This commit is contained in:
parent
c7cd612502
commit
d34c4c2b9c
@ -124,7 +124,7 @@ void CMeterImage::LoadImage(bool bLoadAlways)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Read the bitmap to memory so that it's not locked by GDI+
|
// Read the bitmap to memory so that it's not locked by GDI+
|
||||||
HANDLE fileHandle = CreateFile(filename.c_str(), GENERIC_READ, NULL, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
HANDLE fileHandle = CreateFile(filename.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
|
||||||
if (fileHandle != INVALID_HANDLE_VALUE)
|
if (fileHandle != INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
// Compare the timestamp and filename to check if the file has been changed (don't load if it's not)
|
// Compare the timestamp and filename to check if the file has been changed (don't load if it's not)
|
||||||
|
Loading…
Reference in New Issue
Block a user