Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can set parameters and specific cartridge through arguments option. #771

Merged
merged 1 commit into from Nov 13, 2018

Conversation

taketin
Copy link

@taketin taketin commented Nov 4, 2018

I wanted to set an optional parameter (for example -uiscale) and specific cartridge when initialize time on wasm.
Then I wrote the following code in Javascript.

<script type="text/javascript">
  var Module = {
    canvas: document.getElementById('canvas'),
    arguments: ["tetris.tic", "-uiscale", "1.5"]
  };
</script>

However, it couldn't work as my expected. An optional parameter was worked but didn't boot the cartridge.

I investigate the cause then found it. This p/r is my proposal.

My idea is that if argc[1] has .tic to suffix, we judge to it was given a cartridge.

Please take a look if you have time.
Regards.

Copy link
Owner

@nesbox nesbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good
thank you

@nesbox nesbox merged commit 2108d1f into nesbox:master Nov 13, 2018
@nesbox
Copy link
Owner

nesbox commented Nov 13, 2018

sorry for the delay with the review

@taketin
Copy link
Author

taketin commented Nov 15, 2018

Thanks for merged it!

@taketin taketin deleted the fix_init_option_on_wasm branch November 15, 2018 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants