Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine
Manage
Activity
Members
Labels
Plan
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sip
engine
Commits
57dbf954
Commit
57dbf954
authored
Jul 7, 2019
by
Ivan Dokunov
Browse files
Options
Downloads
Plain Diff
Merge branch 'Fix' into 'branchX'
Fix See merge request
!5
parents
a249675e
907da700
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!5
Fix
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
build/gamesource/shaders/lighting/lighting_com.ps
+2
-2
2 additions, 2 deletions
build/gamesource/shaders/lighting/lighting_com.ps
source/core/FileSystem.cpp
+16
-17
16 additions, 17 deletions
source/core/FileSystem.cpp
source/core/FileSystem.h
+1
-1
1 addition, 1 deletion
source/core/FileSystem.h
with
19 additions
and
20 deletions
build/gamesource/shaders/lighting/lighting_com.ps
+
2
−
2
View file @
57dbf954
...
...
@@ -4,8 +4,8 @@ lighting_blend.ps
Расчет
освещения
и
заполнение
данными
расчетов
render
targets
*
/
#include
<
..
/struct.h
>
#include
<
..
/mtrl.h
>
#include
"
..
/struct.h
"
#include
"
..
/mtrl.h
"
/
/##########################################################################
...
...
This diff is collapsed.
Click to expand it.
source/core/FileSystem.cpp
+
16
−
17
View file @
57dbf954
...
...
@@ -93,7 +93,7 @@ char *CFileSystem::getFileName(const char *name)
return
fn
;
}
time_t
CFileSystem
::
convertF
iletimeToTime_t
(
const
FILETIME
&
ft
)
time_t
CFileSystem
::
f
iletimeToTime_t
(
const
FILETIME
&
ft
)
{
ULARGE_INTEGER
ull
;
ull
.
LowPart
=
ft
.
dwLowDateTime
;
...
...
@@ -234,17 +234,18 @@ bool CFileSystem::fileExists(const char *szPath)
return
false
;
}
HANDLE
hFile
=
getFileHandle
(
path
);
CLOSE_HANDLE
(
hFile
);
mem_delete_a
(
path
);
//Если файл существует то hFile != INVALID_HANDLE_VALUE
return
hFile
!=
INVALID_HANDLE_VALUE
;
return
fileGetSize
(
path
)
!=
-
1
;
}
size_t
CFileSystem
::
fileGetSize
(
const
char
*
szPath
)
{
char
*
path
=
getAbsoliteCanonizePath
(
szPath
);
if
(
!
path
)
{
return
false
;
}
WIN32_FILE_ATTRIBUTE_DATA
lpFileInformation
;
int
result
=
GetFileAttributesEx
(
szPath
,
GetFileExInfoStandard
,
&
lpFileInformation
);
...
...
@@ -254,6 +255,8 @@ size_t CFileSystem::fileGetSize(const char *szPath)
sizeof
(
lpFileInformation
.
nFileSizeLow
)
*
sizeof
(
ULONGLONG
))
|
lpFileInformation
.
nFileSizeLow
;
mem_delete_a
(
path
);
//Если result != 0 то все хорошо, если 0 то файл не найден
return
result
!=
0
?
FileSize
:
FILE_NOT_FOUND
;
}
...
...
@@ -301,17 +304,13 @@ time_t CFileSystem::getFileModifyTime(const char *szPath)
return
0
;
}
FILETIME
mTime
;
HANDLE
hFile
=
getFileHandle
(
path
);
mem_delete_a
(
path
);
WIN32_FILE_ATTRIBUTE_DATA
lpFileInformation
;
GetFile
Time
(
hFile
,
nullptr
,
&
mTime
,
nullptr
);
GetFile
AttributesEx
(
path
,
GetFileExInfoStandard
,
&
lpFileInformation
);
CLOSE_HANDLE
(
hFile
);
mem_delete
(
path
);
return
convertF
iletimeToTime_t
(
m
Time
);
return
f
iletimeToTime_t
(
lpFileInformation
.
ftLastAccess
Time
);
}
IFileSystem
::
IFileIterator
*
CFileSystem
::
getFolderList
(
const
char
*
szPath
)
...
...
This diff is collapsed.
Click to expand it.
source/core/FileSystem.h
+
1
−
1
View file @
57dbf954
...
...
@@ -90,7 +90,7 @@ private:
char
*
getFileName
(
const
char
*
name
);
//! Вспомогательная функция для конвертирования FILETIME в time_t
time_t
convertF
iletimeToTime_t
(
const
FILETIME
&
ft
);
time_t
f
iletimeToTime_t
(
const
FILETIME
&
ft
);
HANDLE
getFileHandle
(
const
char
*
szPath
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment