Skip to content

Commit

Permalink
autolock: false
Browse files Browse the repository at this point in the history
  • Loading branch information
caiiiycuk committed Feb 18, 2019
1 parent 5de4609 commit 572ea53
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ else()
add_definitions(-DDEBUG -DEMSCRIPTEN_KEEPALIVE=)
endif()

add_definitions(-DHAVE_CONFIG_H -DGET_X86_FUNCTIONS)
add_definitions(-DHAVE_CONFIG_H -DGET_X86_FUNCTIONS -DJSDOS)

include(
"${CMAKE_CURRENT_LIST_DIR}/3rd-party/3rd-party.cmake"
Expand Down
4 changes: 2 additions & 2 deletions dist/docs/api/js-dos-ts/js-dos-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ gulpfile.js --> generateBuildInfo
```
export const Build = {
version: "6.22.16 (2133515c489ad3d7ba2ac57213c5670d72ad7bb9)",
wasmSize: 2167039,
version: "6.22.16 (5de460906afb1ba08e236471aa21c14d8e3e052e)",
wasmSize: 2167052,
jsSize: 503703,
};
Expand Down
17 changes: 16 additions & 1 deletion dist/docs/api/js-dos-ts/js-dos-conf.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fulldouble=false
fullresolution=original
windowresolution=original
output=surface
autolock=true
autolock=false
sensitivity=100
waitonerror=true
priority=higher,normal
Expand Down Expand Up @@ -254,6 +254,21 @@ ipx=false
[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
# https://js-dos.com
# █▀▀▀▀▀█ █ ▄▄▄▀▀█ █▀▀▀▀▀█
# █ ███ █ ██▄ █ ▀ ▄ █ ███ █
# █ ▀▀▀ █ ▄██ ▀ ▀▀█ █ ▀▀▀ █
# ▀▀▀▀▀▀▀ ▀ █▄▀▄▀ █ ▀▀▀▀▀▀▀
# █▀▄▄█▀▀▄▄ ▀ ▀█▄▄▄▄ ▀▄█▀█▀
# █▀ ▀ ▀▀▄ █▀ ▄ ▄▀▀▀▄ █▀█▄
# ▄ ▄▄ █▀▀▄ ▄▀▄▀▀█ ▀▀▄▀▀█▀
# ▄▀▀█▀▀ █▀█▀█▀▀▄ ▀██▀█▄
# ▀▀▀ ▀ ▀ █▄█ ▀█▄▄█▀▀▀█▀▀
# █▀▀▀▀▀█ ▄▄▄ ▄ ▄ █ ▀ █▄▄▄▄
# █ ███ █ ▀█▀▀▄▀▀▄████▀▀█▄█
# █ ▀▀▀ █ ▄▀▀█▀█▀▄ ▀▀▄▄█▄█
# ▀▀▀▀▀▀▀ ▀ ▀▀ ▀ ▀ ▀▀▀
`;
Expand Down
4 changes: 2 additions & 2 deletions dreamlayers-em-dosbox-em-dosbox-svn-sdl2/src/gui/sdlmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ static bool use_capture_callback = false;
static void doGFX_CaptureMouse(void);

void GFX_CaptureMouse(void) {
if (use_capture_callback) {
if (use_capture_callback && !sdl.mouse.autoenable) {
if (sdl.mouse.locked) {
emscripten_exit_pointerlock();
} else {
Expand Down Expand Up @@ -2591,7 +2591,7 @@ void Config_Add_SDL() {
Pstring->Set_values(renderers);
#endif // SDL_VERSION_ATLEAST(2,0,0)

Pbool = sdl_sec->Add_bool("autolock",Property::Changeable::Always,true);
Pbool = sdl_sec->Add_bool("autolock",Property::Changeable::Always,false);
Pbool->Set_help("Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock)");

Pint = sdl_sec->Add_int("sensitivity",Property::Changeable::Always,100);
Expand Down
4 changes: 2 additions & 2 deletions js-dos-ts/js-dos-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// gulpfile.js --> generateBuildInfo

export const Build = {
version: "6.22.16 (2133515c489ad3d7ba2ac57213c5670d72ad7bb9)",
wasmSize: 2167039,
version: "6.22.16 (5de460906afb1ba08e236471aa21c14d8e3e052e)",
wasmSize: 2167052,
jsSize: 503703,
};
17 changes: 16 additions & 1 deletion js-dos-ts/js-dos-conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fulldouble=false
fullresolution=original
windowresolution=original
output=surface
autolock=true
autolock=false
sensitivity=100
waitonerror=true
priority=higher,normal
Expand Down Expand Up @@ -245,4 +245,19 @@ ipx=false
[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
# https://js-dos.com
# █▀▀▀▀▀█ █ ▄▄▄▀▀█ █▀▀▀▀▀█
# █ ███ █ ██▄ █ ▀ ▄ █ ███ █
# █ ▀▀▀ █ ▄██ ▀ ▀▀█ █ ▀▀▀ █
# ▀▀▀▀▀▀▀ ▀ █▄▀▄▀ █ ▀▀▀▀▀▀▀
# █▀▄▄█▀▀▄▄ ▀ ▀█▄▄▄▄ ▀▄█▀█▀
# █▀ ▀ ▀▀▄ █▀ ▄ ▄▀▀▀▄ █▀█▄
# ▄ ▄▄ █▀▀▄ ▄▀▄▀▀█ ▀▀▄▀▀█▀
# ▄▀▀█▀▀ █▀█▀█▀▀▄ ▀██▀█▄
# ▀▀▀ ▀ ▀ █▄█ ▀█▄▄█▀▀▀█▀▀
# █▀▀▀▀▀█ ▄▄▄ ▄ ▄ █ ▀ █▄▄▄▄
# █ ███ █ ▀█▀▀▄▀▀▄████▀▀█▄█
# █ ▀▀▀ █ ▄▀▀█▀█▀▄ ▀▀▄▄█▄█
# ▀▀▀▀▀▀▀ ▀ ▀▀ ▀ ▀ ▀▀▀
`;
25 changes: 25 additions & 0 deletions test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,31 @@ test("js-dos-fs can create file (windows path)", (done) => {

suite("js-dos");

test("js-dos should provide user level dosbox.conf", (done) => {
const dos = Dos(document.getElementById("canvas") as HTMLCanvasElement, {
wdosboxUrl: "/wdosbox.js",
onerror: (message) => {
assert.fail();
},
});

doReady(dos, (fs, main) => {
fs.createFile("dosbox.conf", `
[autoexec]
mount c .
c:
cd HOME
cd WEB_USER
cd DOSBOX~1
type dosbox~1.con
`);

doNext(main(["-conf", "dosbox.conf"]), (ci) => {
compareAndExit("jsdos-conf.png", ci, done);
});
});
});

test("js-dos can create and read dosbox.conf", (done) => {
const dos = Dos(document.getElementById("canvas") as HTMLCanvasElement, {
wdosboxUrl: "/wdosbox.js",
Expand Down

0 comments on commit 572ea53

Please sign in to comment.