mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Cosmetics
This commit is contained in:
parent
9623766a61
commit
dc35b31559
@ -449,7 +449,6 @@
|
||||
<ClInclude Include="UpdateCheck.h" />
|
||||
<ClInclude Include="lua\LuaManager.h" />
|
||||
<ClInclude Include="lua\LuaScript.h" />
|
||||
<ClInclude Include="lua\include\lua.hpp" />
|
||||
<ClInclude Include="lua\lua\luaconf.h" />
|
||||
<ClInclude Include="lua\lua\lapi.h" />
|
||||
<ClInclude Include="lua\lua\lauxlib.h" />
|
||||
|
@ -19,9 +19,6 @@
|
||||
<Filter Include="Lua\glue">
|
||||
<UniqueIdentifier>{941dce28-a314-4492-befb-5770432c98bf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Lua\Lua Headers">
|
||||
<UniqueIdentifier>{45f9e20c-cd34-4e18-84f2-9090ee108656}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Lua\Lua">
|
||||
<UniqueIdentifier>{c8550e7b-009b-4e12-a55a-ed458d05bdad}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@ -446,12 +443,6 @@
|
||||
<ClInclude Include="lua\LuaScript.h">
|
||||
<Filter>Lua</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lua\include\lua.hpp">
|
||||
<Filter>Lua\Lua Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lua\lua\luaconf.h">
|
||||
<Filter>Lua\Lua Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lua\lua\lapi.h">
|
||||
<Filter>Lua\Lua</Filter>
|
||||
</ClInclude>
|
||||
@ -548,6 +539,9 @@
|
||||
<ClInclude Include="MathParser.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lua\lua\luaconf.h">
|
||||
<Filter>Lua\Lua</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Library.rc">
|
||||
|
@ -45,7 +45,7 @@ void CMeasureMemory::UpdateValue()
|
||||
{
|
||||
MEMORYSTATUSEX stat;
|
||||
stat.dwLength = sizeof(MEMORYSTATUSEX);
|
||||
GlobalMemoryStatusEx(&stat); // Doesn't measure values > 4GB. Should use GlobalMemoryStatusEx instead, but that requires Win2k.
|
||||
GlobalMemoryStatusEx(&stat);
|
||||
if (m_Total)
|
||||
{
|
||||
m_Value = (double)(__int64)(stat.ullTotalPageFile + stat.ullTotalPhys);
|
||||
|
@ -53,18 +53,19 @@ void CMeasureRegistry::UpdateValue()
|
||||
WCHAR* data = new WCHAR[size];
|
||||
DWORD type = 0;
|
||||
|
||||
if (RegQueryValueEx(m_RegKey,
|
||||
m_RegValueName.c_str(),
|
||||
NULL,
|
||||
(LPDWORD)&type,
|
||||
(LPBYTE)data,
|
||||
(LPDWORD)&size) == ERROR_SUCCESS)
|
||||
if (RegQueryValueEx(
|
||||
m_RegKey,
|
||||
m_RegValueName.c_str(),
|
||||
NULL,
|
||||
(LPDWORD)&type,
|
||||
(LPBYTE)data,
|
||||
(LPDWORD)&size) == ERROR_SUCCESS)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case REG_DWORD:
|
||||
m_Value = *((LPDWORD)data);
|
||||
m_StringValue.erase();
|
||||
m_StringValue.clear();
|
||||
break;
|
||||
|
||||
case REG_SZ:
|
||||
@ -76,18 +77,18 @@ void CMeasureRegistry::UpdateValue()
|
||||
|
||||
case REG_QWORD:
|
||||
m_Value = (double)((LARGE_INTEGER*)data)->QuadPart;
|
||||
m_StringValue.erase();
|
||||
m_StringValue.clear();
|
||||
break;
|
||||
|
||||
default: // Other types are not supported
|
||||
m_Value = 0.0;
|
||||
m_StringValue.erase();
|
||||
m_StringValue.clear();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Value = 0.0;
|
||||
m_StringValue.erase();
|
||||
m_StringValue.clear();
|
||||
RegOpenKeyEx(m_HKey, m_RegKeyName.c_str(), 0, KEY_READ, &m_RegKey);
|
||||
}
|
||||
|
||||
|
@ -18,8 +18,13 @@
|
||||
|
||||
#ifndef __LUAMANAGER_H__
|
||||
#define __LUAMANAGER_H__
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "lua.h"
|
||||
#include "lualib.h"
|
||||
#include "lauxlib.h"
|
||||
}
|
||||
|
||||
class LuaManager
|
||||
{
|
||||
|
@ -19,7 +19,6 @@
|
||||
#ifndef __LUASCRIPT_H__
|
||||
#define __LUASCRIPT_H__
|
||||
|
||||
#include "lua.hpp"
|
||||
#include "LuaManager.h"
|
||||
|
||||
class LuaScript
|
||||
|
@ -1,16 +0,0 @@
|
||||
// lua.hpp
|
||||
// Lua header files for C++
|
||||
// <<extern "C">> not supplied automatically because Lua also compiles as C++
|
||||
|
||||
extern "C" {
|
||||
#include "lua.h"
|
||||
#include "lualib.h"
|
||||
#include "lauxlib.h"
|
||||
}
|
||||
|
||||
|
||||
#ifdef _RELEASE
|
||||
|
||||
#else if _DEBUG
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user